Vikram

Vikram

  • 1.1k
  • 276
  • 308.4k

Set properties of UserControl after Page.LoadTemplate()

Jul 16 2010 3:18 AM

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