Click here to Skip to main content
15,891,906 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all,
I have a ajax tab container which I created dynamically in C#. I would like to know how to add a Css class to this ajax tab container in C#.

This is my codes:
C#
public void tabContainer()
        {
            //Create new TabContainer
            AjaxControlToolkit.TabContainer container = new AjaxControlToolkit.TabContainer();
            container.ID = "TabContainer";
            container.EnableViewState = false;
            container.Tabs.Clear();

if (ListBox.SelectedValue == "Select All")    //If 'Select All' option is selected from ListBox
            {
                foreach (ListItem item in ListBox.Items)
                {
                    if (item.Text == "Select All")
                    {
                        continue;
                    }
                    AjaxControlToolkit.TabPanel panel = new AjaxControlToolkit.TabPanel();
                    panel.HeaderText += item.Text;
                    container.Tabs.Add(panel);

Appreciate if someone help me on this. Thanks a lot!!
Posted

1 solution

Refer - Ajax Control Toolkit TabContainer[^]
Quote:
CssClass - A css class override used to define a custom look and feel for the tabs. See the Tabs Theming section for more details.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900