I have a webpart in sharepoint 2010 with many pages (ControlTemplates) Iam just analize request QueryString "action" param to set active page. In webPart class code looks like (method CreateChildControls):
string ccontrol = _ascxPath;
if (Page.Request.QueryString["action"] == "ServiceRequest") { ccontrol = _RequestPath; }
if (Page.Request.QueryString["action"] == "Bim") { ccontrol = _BimPath; }
if (Page.Request.QueryString["action"] == "BimRequest") { ccontrol = _BimRequestPath; }
Control control = Page.LoadControl(ccontrol);
Controls.Add(control);
In this pages a have a same html blocks, like top usermenu, pagetitle, sidebar , footer and others. I my project a put some root elements on each aspx page, for example:
<div class='quick_links' id="ctrl_quick_links" runat="server"></div>
and then call some helper class to draw menu...
ctrl_quick_links.Controls.Add(new pViewHelper().mainMenu());
My question is, how i can use one template page for draw this elements?? Like masterpages.. Structure like:
Masterpage
- MyWebpart
-- InternalMasterPate (header, footer, usermenu, sidebars here)
--- WebPart Pages (only content for page)
