K
kjartan93a
The following code is on my master page, site.master.cs:
// programatically add a WebPart from a User Control file
Control uc = this.LoadControl(@"ucLotListSimple.ascx");
uc.ID = "MyWp";
GenericWebPart MyWp = WebPartManager1.CreateWebPart(uc);
WebPartManager1.AddWebPart(wp2, wpzUpper, 1);
The last line above works fine only if the WebPartZone wpzUpper is
located on the master page itself.
What is the proper way to reference wpzUpper if it is on the content
page "Default.aspx"?
Thanks.
// programatically add a WebPart from a User Control file
Control uc = this.LoadControl(@"ucLotListSimple.ascx");
uc.ID = "MyWp";
GenericWebPart MyWp = WebPartManager1.CreateWebPart(uc);
WebPartManager1.AddWebPart(wp2, wpzUpper, 1);
The last line above works fine only if the WebPartZone wpzUpper is
located on the master page itself.
What is the proper way to reference wpzUpper if it is on the content
page "Default.aspx"?
Thanks.