protected void Load_CountryList() { BLL_Infra_Country objCountry = new BLL_Infra_Country(); ddlNationality.DataSource = objCountry.Get_CountryList(); ddlNationality.DataTextField = "COUNTRY"; ddlNationality.DataValueField = "ID"; ddlNationality.DataBind(); ddlNationality.Items.Insert(0, new ListItem("-Select-", "0")); }
protected void InitialCountryBind() { BLL_Infra_Country objBLLCountry = new BLL_Infra_Country(); DataTable dt = objBLLCountry.Get_CountryList(); ddlCountry.DataSource = dt; ddlCountry.DataTextField = "COUNTRY"; ddlCountry.DataValueField = "ID"; ddlCountry.DataBind(); ddlCountry.Items.Insert(0, new ListItem("-Select-", "0")); }
public void BindCountryDLL() { BLL_Infra_Country objCN = new BLL_Infra_Country(); DataTable dt = objCN.Get_CountryList(); ddlCountry_AV.DataTextField = "COUNTRY"; ddlCountry_AV.DataValueField = "COUNTRY"; ddlCountry_AV.DataSource = dt; ddlCountry_AV.DataBind(); ddlCountry_AV.Items.Insert(0, new ListItem("-SELECT-", "0")); }
private void Load_CountryList() { try { BLL_Infra_Country objCountry = new BLL_Infra_Country(); DDLNationality.DataSource = objCountry.Get_CountryList(); DDLNationality.DataTextField = "COUNTRY"; DDLNationality.DataValueField = "ID"; DDLNationality.DataBind(); } catch { } }
private void Load_Country() { try { BLL_Infra_Country objCountry = new BLL_Infra_Country(); ddlCountry.DataSource = objCountry.Get_CountryList(); ddlCountry.DataTextField = "COUNTRY"; ddlCountry.DataValueField = "ID"; ddlCountry.DataBind(); ddlCountry.Items.Insert(0, new ListItem("-Select-", "0")); } catch { } }
protected void Load_CountryList() { BLL_Infra_Country objBLLCountry = new BLL_Infra_Country(); DataTable dt = objBLLCountry.Get_CountryList(); ddlAddCountry.DataSource = dt; ddlAddCountry.DataTextField = "Country"; ddlAddCountry.DataValueField = "ID"; ddlAddCountry.DataBind(); ddlSearchCountry.DataSource = dt; ddlSearchCountry.DataTextField = "Country"; ddlSearchCountry.DataValueField = "ID"; ddlSearchCountry.DataBind(); }
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e) { try { GridView1.EditIndex = e.NewEditIndex; BindData(); lblMessage.Text = ""; DropDownList ddlYesNo = ((DropDownList)(GridView1.Rows[e.NewEditIndex].FindControl("ddlYN"))); if (ddlYesNo != null) { ddlYesNo.SelectedValue = "1"; } DropDownList ddlCountry = ((DropDownList)(GridView1.Rows[e.NewEditIndex].FindControl("ddlCountry"))); BLL_Infra_Country objBLLCountry = new BLL_Infra_Country(); DataTable dtt = objBLLCountry.Get_CountryList(); ddlCountry.DataSource = dtt; ddlCountry.DataTextField = "Country"; ddlCountry.DataValueField = "ID"; ddlCountry.DataBind(); ddlCountry.Items.Insert(0, new ListItem("--Select--", "0")); HiddenField hdnId = new HiddenField(); hdnId = (HiddenField)GridView1.Rows[GridView1.EditIndex].FindControl("hdnId"); HiddenField hdnCountryId = new HiddenField(); hdnCountryId = (HiddenField)GridView1.Rows[GridView1.EditIndex].FindControl("hdnCountryId"); HiddenField hdnScannedMand = new HiddenField(); hdnScannedMand = (HiddenField)GridView1.Rows[GridView1.EditIndex].FindControl("hdnScannedMand"); Session["isScannedMandatory"] = Convert.ToString(hdnScannedMand.Value); if (!string.IsNullOrEmpty(hdnId.Value)) { ddlCountry.SelectedItem.Text = hdnId.Value; ddlCountry.SelectedValue = hdnCountryId.Value; } else { ddlCountry.SelectedIndex = 0; } } catch { } }
protected void Page_Load(object sender, EventArgs e) { UserAccessValidation(); if (!IsPostBack) { BLL_Infra_Country objCN = new BLL_Infra_Country(); DataTable dt = objCN.Get_CountryList(); ddlCountry_AV.DataTextField = "COUNTRY"; ddlCountry_AV.DataValueField = "COUNTRY"; ddlCountry_AV.DataSource = dt; ddlCountry_AV.DataBind(); ddlCountry_AV.Items.Insert(0, new ListItem("-SELECT-", "0")); BindMakerGrid(); } }