In asp.net dynamic tab panel - data bind from database
Example:
Purchase sale invoice ---this is dynamic tab from database
Bind data tab panel but not display in form
I want bind data to Ajax TabContiner from database in asp.net
<cc1:TabContainer ID="TabContentCategoryList" runat="server" CssClass="NewsTab"
Width="100%" ActiveTabIndex="1">
<cc1:TabPanel ID="TabPFarmProfile" runat="server">
<ContentTemplate>
</ContentTemplate>
</cc1:TabPanel>
</cc1:TabContainer>
protected void DynamicTab()
{
int OrganizationId = Convert.ToInt32(Session["CompanyId"].ToString());
int LanguageId = Convert.ToInt32(Session["LanguageId"].ToString());
int Login_Id = Convert.ToInt32(Session["LoginId"].ToString());
int Userid = Convert.ToInt32(Session["UserId"].ToString());
int PageIndex = 1;
int PageSize2 = CurrentPgSizeView2();
string SortOrder2 = ViewState["SortExpression"] + " " + ViewState["SortDirection"];
txtPagesizeView2.Text = PageSize2.ToString();
TabContentCategoryList = new AjaxControlToolkit.TabContainer();
object[] param = { 0, LanguageId, OrganizationId, Userid, Login_Id, PageIndex, PageSize2, SortOrder2 };
DataSet Dt = objAD_ContentManagementBAL.KnowledgeRepository(param);
if (Dt.Tables.Count > 0)
{
DataTable dtcontenttype = Dt.Tables[2];
foreach (DataRow drp in dtcontenttype.Rows)
{
AjaxControlToolkit.TabPanel tblCategorylist = new AjaxControlToolkit.TabPanel();
tblCategorylist.HeaderText = drp["Content_Type"].ToString();
tblCategorylist.ID = drp["ContentType_ID"].ToString();
TabContentCategoryList.Tabs.Add(tblCategorylist);
}
}
}