how to load IFrame in my controls

Posted by Jayakumars under ASP.NET on 5/9/2011 | Points: 10 | Views : 1913 | Status : [Member] [MVP] | Replies : 1
i need How to Dynamically Load usercontrol in Ajax tab container
I am design 4 tab in ajax tabcontainer now i m click event open a new window
when i click new window page i need redirect load my usercontrols to tabcontainers
how will do this most urgents

Mark as Answer if its helpful to you


Responses

Posted by: Ndebata on: 5/9/2011 [Member] Starter | Points: 25

Up
0
Down
Hi
Lets say your ajax tab container is something like this,

<asp:TabContainer ID="TabContainer1" runat="server">
<asp:TabPanel runat="server" ID="panel1">
</asp:TabPanel>
</asp:TabContainer>

If you want to load user control to this tabcontainer
First add a reference to the user control
<%@ Register Src="Controls/xyz.ascx" TagName="xyz" TagPrefix="uc1" %>

UserControlClass ctrl = Page.LoadControl(<Virtual path of that user control you want to load>) as UserControlClass;
panel1.Controls.Add(ctrl);

Thanks,
Debata

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response