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!!
use the following:
container.CssClass = "ClassName";
more info here: https://ajaxcontroltoolkit.codeplex.com/wikipage?title=TabContainer%20and%20TabPanel%20Controls&referringTitle=Tutorials