简体   繁体   中英

Add a Css Class to Ajax Tab Container In C#

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:

    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!!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM