private void LoadDataEdit() { try { OtherFunctions obj = new OtherFunctions(); int DistrictID = Globals.GetIntFromQueryString("DistrictID"); DataSet ds = obj.GetDistrictByDistrictID("District", DistrictID); txtName.Value = Convert.ToString(ds.Tables[0].Rows[0]["DistrictName"]); ddlProvince.SelectedValue = Convert.ToString(ds.Tables[0].Rows[0]["ProvinceID"]); } catch { Response.Redirect("District.aspx"); } }