protected void FillCategorysearch() { string strlan = "select * from Mainmenucategory where MasterPage_Id='" + DDLmasterpageL.SelectedValue + "'"; SqlCommand cmdlan = new SqlCommand(strlan, con); SqlDataAdapter adplan = new SqlDataAdapter(cmdlan); DataSet dslan = new DataSet(); adplan.Fill(dslan); DDLCategoryS.DataSource = dslan; DDLCategoryS.DataTextField = "MainMenuCatName"; DDLCategoryS.DataValueField = "MainMenucatId"; DDLCategoryS.DataBind(); DDLCategoryS.Items.Insert(0, "-Select-"); DDLCategoryS.Items[0].Value = "0"; }
protected void FillterCategorysearch() { string stractive = ""; if (chk_activefilter.Checked == true) { stractive = " and dbo.Mainmenucategory.Active='1' "; } string strlan = "select * from Mainmenucategory where MasterPage_Id='" + FilterProduct.SelectedValue + "'" + stractive; SqlCommand cmdlan = new SqlCommand(strlan, con); SqlDataAdapter adplan = new SqlDataAdapter(cmdlan); DataSet dslan = new DataSet(); adplan.Fill(dslan); DDLCategoryS.DataSource = dslan; DDLCategoryS.DataTextField = "MainMenuCatName"; DDLCategoryS.DataValueField = "MainMenucatId"; DDLCategoryS.DataBind(); DDLCategoryS.Items.Insert(0, "-Select-"); DDLCategoryS.Items[0].Value = "0"; }