// Definition of BindDrpCountry() public void BindDrpCountry() { col1 = objCountry.Get_All(); drpCountry.DataTextField = "countryname"; drpCountry.DataValueField = "countryid"; drpCountry.DataSource = col1; drpCountry.DataBind(); drpCountry.SelectedValue = "1"; }
public void BindGrid() { // Initialize col objects, to get collection of Country_mst objects by Calling Function Get_All() col = objCountry.Get_All(); // Bind GridView via col datasource grvwCountry.DataSource = col; grvwCountry.DataBind(); }
public void BindDrpCountry() { //Bind Drop Down Country col1 = objCountry.Get_All(); drpCountry.DataTextField = "countryname"; drpCountry.DataValueField = "countryid"; drpCountry.DataSource = col1; drpCountry.DataBind(); }