if (!IsPostBack) { string sql1 = "sql query"; DataTable dt = obj.RunSqlReturnDT(sql1); Accordion1.DataSource = dt.DefaultView; Accordion1.DataBind(); } Accordion1_ItemDataBound Event(Repeater bind inside accordion AS MENU) protected void Accordion1_ItemDataBound(object sender, AjaxControlToolkit.AccordionItemEventArgs e) { if (e.ItemType == AjaxControlToolkit.AccordionItemType.Header) { string a = (e.AccordionItem.FindControl("Label4") as Label).Text; ViewState["Categoryname"] = a; } if (e.ItemType == AjaxControlToolkit.AccordionItemType.Content) { string cat_name = ViewState["Categoryname"].ToString(); sql ="sql query"; Repeater Repeater1 = (Repeater)e.AccordionItem.FindControl("Repeater1"); DataTable dt = obj.RunSqlReturnDT(sql11); Repeater1.DataSource = dt; Repeater1.DataBind(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)