//fetching already stored countries from the tables and showing country that //is stored ////////////public void country(){ DataSet ds = new DataSet(); ds.Clear(); ds = cmn.Country_Fetch(); if (ds.Tables[0].Rows.Count != 0) { ddlCountry.DataSource = ds; //ddlCountry.DataTextField = "country_name"; //ddlCountry.DataValueField = "country_id"; ddlCountry.DataBind(); ddlCountry.SelectedIndex = ddlCountry.Items.IndexOf(ddlCountry.Items.FindByValue(ds.Tables[0].Rows[0]["country_id"].ToString())); } }