if (!IsPostBack) { Filldata(); loadpage(); } public void Filldata() { DataTable Dt = objdatahandler.Getallcountry(); ddlCountry.DataSource = Dt; ddlCountry.DataTextField = "CountryName"; ddlCountry.DataValueField = "CountryID"; ddlCountry.DataBind(); ddlCountry.Items.Insert(0, new ListItem("Select", "0")); } public void loadpage() { int regaid = Convert.ToInt32(Request.QueryString["id"]); objcomreg.regid = regaid; DataTable Dt = objdatahandler.getcountbyid(objcomreg); if (Dt.Rows.Count > 0) { ddlCountry.SelectedValue = Dt.Rows[0]["Country"].ToString(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)