use find control method, find your user control object and in your user control you can create public properties/methods, with the user control object you can set the properties,
I have created properties in the User control. To use find control method I need Id of User Control and as I loaded user control by using LoadTemplate("virtual path") directly to the tab panel, I don't have Id of User Control.
Is there any way to get Id of User Control loaded by using above method.
I have created properties in the User control. To use find control method I need Id of User Control and as I loaded user control by using LoadTemplate("virtual path") directly to the tab panel, I don't have Id of User Control.
Is there any way to get Id of User Control loaded by using above method.
Regards,
VIkram
Exactly i have the same problem.
any body help, please?
Microsoft Certified Solution Developer(MCSD.Net)
Microsoft Certified Technology Specialist(MCTS Web & Win & XML webservice)
infovik
Member
61 Points
40 Posts
Set Properties After Page.LoadTemplate
Jul 16, 2010 07:15 AM|LINK
Hi friends,
In my Application, I am creating Tabpanel Dynamically in TabContainer. After Creating Tabpanel I put UserControl in to the TabPanel. here is code...
AjaxControlToolkit.TabPanel newTab = new AjaxControlToolkit.TabPanel();
newTab.HeaderText = "Header1";
newTab.ContentTemplate = Page.LoadTemplate("~/UC/MyUC.ascx")
TabContainer1.Tabs.Add(newTab);
This is working fine with me. Now I want set few properties of UserControl which I loaded into Tabpanel.
How do I get the Object of User Control from the Tab panel ContentTemplate to set properties.
Any Help appreciated....
Regards,
VIkram
nizam133
Contributor
3538 Points
638 Posts
Re: Set Properties After Page.LoadTemplate
Jul 16, 2010 09:44 AM|LINK
use find control method, find your user control object and in your user control you can create public properties/methods, with the user control object you can set the properties,
infovik
Member
61 Points
40 Posts
Re: Set Properties After Page.LoadTemplate
Jul 16, 2010 10:49 AM|LINK
Thanks for reply,
I have created properties in the User control. To use find control method I need Id of User Control and as I loaded user control by using LoadTemplate("virtual path") directly to the tab panel, I don't have Id of User Control.
Is there any way to get Id of User Control loaded by using above method.
Regards,
VIkram
thinksomid
Member
2 Points
2 Posts
Re: Set Properties After Page.LoadTemplate
Feb 09, 2013 12:13 PM|LINK
Exactly i have the same problem.
any body help, please?
Microsoft Certified Technology Specialist(MCTS Web & Win & XML webservice)
chetan.sarod...
All-Star
65759 Points
11153 Posts
Re: Set Properties After Page.LoadTemplate
Feb 11, 2013 02:38 AM|LINK
Refer this
http://forums.asp.net/t/1078571.aspx/1/10
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.