in

SharePoint University

Clean slate. Nothing but SharePoint.
Go, SharePoint!

WebPartPages:WebPartZone does not render webpart

Last post 06-09-2008 3:22 AM by crapp. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 10-19-2007 1:27 AM

    WebPartPages:WebPartZone does not render webpart

    Why does this not work? 

    <webpartpages:webpartzone runat="server" id="wpzLeft" title="Webparts left" partchrometype="None">
    <zonetemplate>
     <MyWebParts:Nav id="MyPart" />
    </zonetemplate>
    </
    webpartpages:webpartzone>

    But this does?

    <webpartpages:webpartzone runat="server" id="wpzLeft" title="Webparts left" partchrometype="None">
    <zonetemplate>
     <asp:Label ID="lbl" runat="server" Text="Hello" />
    </zonetemplate>
    </
    webpartpages:webpartzone>

    The MyWebParts prefix is registered and I know it's working because altering the namespace in an attempt to break compilation does just that. The page renders happily but there's no sign of MyPart. I can add it manually to the wpz but I want it to display by default.

    Thanks for any help,

    Michhes

  • 10-19-2007 1:51 AM In reply to

    Re: WebPartPages:WebPartZone does not render webpart

    ZoneTemplate led me astray: I forgot the runat="server" attribute on my MyPart. Adding it did the trick Stick out tongue

  • 06-09-2008 3:22 AM In reply to

    • crapp
    • Not Ranked
    • Joined on 06-09-2008

    Re: WebPartPages:WebPartZone does not render webpart

    Hi

    is it possible to pass values from masterpage webpart to a content page webpart?

    if it is possible then which assembly is to be registerd so as to get the <webpartpages:webpartzone tag in masterpage.?(in that i can add my webpart)

     

Page 1 of 1 (3 items)

Need SharePoint Training? Attend a SharePoint Bootcamp!
Forum content (c) original posters. Everything else (c) 2008 SharePoint Experts, Inc.