Wednesday, March 21, 2012

ascx pages in tabs, tabs positioning with tabseparator.

How to load an ascx page into the tabs.

Does Ajax tabcontainer has any field something like "tabseparator" with which i can place few tabs on left and few on right side of the page?

Hi,

You can use the following code to load UserControl into a tab.

Control uc = Page.LoadControl("relative path to the .ascx file");

tabPanel.Controls.Add(uc);

And as far as I konw, there is no tabSeparator currently.


Well, its a different story... am writing a custom tab thru a class library which would get the configuration of tabs and their content from other files...

and this classlibrary would give me a final builded tab control, which i would add to my page.

so how to make the same page.loadcontrol(path of file) in class library


You can use a path relative to the root folder (a path starts with tilde, e.g., ~/.... ). Then no matter on which page is control is added, it will be able to find the user control.

No comments:

Post a Comment