none
What is the use of ZoneTemplate ? RRS feed

  • Question

  • hi,

    I have created a custom page layout with webpart zones. I have added a button control in ZoneTemplate tag. But it is not getting appeared on the page.

    What is the use of ZoneTemplate ?


    Thanks,

    Thursday, January 5, 2017 3:03 PM

All replies

  • Please check the XML schema pages on MSDN for SharePoint. https://msdn.microsoft.com/en-us/library/office/ms414322.aspx

    The hierarchy defined what is allow and what is not allowed in which tag.


    Thanks, Ashish | Please mark a post helpful/answer if it is helpful or answer your query.

    Thursday, January 5, 2017 9:36 PM
  • Hi,

    SharePoint WebPartZone is container for Web Parts, you should not add common asp.net controls into it, if you want to add common asp.net controls in page layout, you could add the controls out of WebPartZone.

    https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webpartpages.webpartzone.aspx

    The ZoneTemplate is actually inherited from System.Web.UI.WebControls.WebParts.WebPartZone, you could use common asp.net controls into it in asp.net while not in SharePoint WebPartZone.

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Friday, January 6, 2017 5:32 AM
  • Thanks Lee for the details provided. as you suggested i have added a button control inside ZoneTemplate, but it is not getting displayed on the browser.
    Monday, January 9, 2017 10:16 AM
  • Hi,

    You need add the control out of WebPartZone, below is my test code.

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, January 9, 2017 10:24 AM
  • Hi,

    Is any update for your issue?

    Best
    Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, February 6, 2017 8:35 AM