protected void ddlAssetGroupName_OnSelectedIndexChanged(object sender, EventArgs e) { if (ddlAssetGroupName1.SelectedValue == "WL") { DropDownList1.Items.Clear(); DropDownList1.Items.Insert(0, new System.Web.UI.WebControls.ListItem("Welcome Letter Email Status", "WLES")); DropDownList2.Visible = false; Label1.Visible = false; DropDownList3.Items.Clear(); DropDownList3.Items.Insert(0, new System.Web.UI.WebControls.ListItem("Email", "Email")); } else { DataSet ds = onlineOrderBackOfficeBo.GetNotificationTypes(ddlAssetGroupName1.SelectedValue); if (ds.Tables[0].Rows.Count > 0) { DropDownList1.DataSource = ds; DropDownList1.DataTextField = ds.Tables[0].Columns["CNT_NotificationType"].ToString(); DropDownList1.DataValueField = ds.Tables[0].Columns["CNT_ID"].ToString(); DropDownList1.DataBind(); DropDownList1.Items.Insert(0, new System.Web.UI.WebControls.ListItem("Select", "0")); } else { DropDownList1.Items.Clear(); } } }