asp.net - AspxPageControl Tabs with Web Pages -
i have asp.net project dynamic tabs , want show web pages designed before in tabs.
i'm using aspxpagecontrol on page that. couldn't make showing pages on aspxpagecontrol tabs. tabs show nothing.
how can this? ok me if there other way.
thanks in advance.
this button creates new tab
protected void button1_click(object sender, eventargs e) { tabpage tab = new tabpage(); tab.text = "tabtext"; tab.name = "tabid"; var ctrl = new literalcontrol("<iframe src='http://www.w3schools.com'></iframe>"); ctrl.id = "controlid"; tab.controls.add(ctrl); aspxpagecontrol1.tabpages.add(tab); }
and design
<asp:updatepanel id="updatepanel2" runat="server"> <contenttemplate> <asp:button id="button1" runat="server" onclick="button1_click" text="button" /> <dx:aspxpagecontrol id="aspxpagecontrol1" runat="server" activetabindex="0" enablecallbacks="true" enableclientsideapi="true" height="265px" onactivetabchanged="aspxpagecontrol1_activetabchanged" onactivetabchanging="aspxpagecontrol1_activetabchanging" rendermode="lightweight" width="726px"> <tabpages> <dx:tabpage text="sekme 1"> <contentcollection> <dx:contentcontrol runat="server" supportsdisabledattribute="true"> hello </dx:contentcontrol> </contentcollection> </dx:tabpage> <dx:tabpage text="sekme 2"> <contentcollection> <dx:contentcontrol runat="server" supportsdisabledattribute="true"> <%--this works when comment out. want dynamic pages--%> <%--<iframe src="default.aspx" runat="server" id="frm2" style="width:99%; height:78vh; margin-top:20px;"> </iframe>--%> </dx:contentcontrol> </contentcollection> </dx:tabpage> </tabpages> </dx:aspxpagecontrol> </contenttemplate> </asp:updatepanel>
Comments
Post a Comment