protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { GetLoadedDropDownlists(); thanaDropDownList.DataSource = centerManager.GeTthanaAccordingToDistrictName(int.Parse(districtDropDownList.SelectedValue.ToString())); thanaDropDownList.DataTextField = "Name"; thanaDropDownList.DataValueField = "Id"; thanaDropDownList.DataBind(); } }
public void GetLoadedThanaDropDownList() { int id = Convert.ToInt16(districtDropDownList.SelectedValue); thanaDropDownList.DataSource = centerManager.GeTthanaAccordingToDistrictName(id); thanaDropDownList.DataValueField = "Id"; thanaDropDownList.DataTextField = "Name"; thanaDropDownList.DataBind(); }