private void BindData() { ddlCountry.DataSource = country.ShowCountry(); ddlCountry.DataTextField = "CountryName"; ddlCountry.DataBind(); ddlCountry.Items.Insert(0, "Choose One..."); ddlState.DataSource = state.ShowAllState(); ddlState.DataTextField = "StateName"; ddlState.DataBind(); ddlState.Items.Insert(0, "Choose One..."); }
//--------------------------------------------------------------------------- private void BindData() { ddlCountry.DataSource = country.ShowCountry(); ddlCountry.DataTextField = "CountryName"; ddlCountry.DataBind(); ddlCountry.Items.Insert(0, "Choose One..."); ddlState.DataSource = state.ShowAllState(); ddlState.DataTextField = "StateName"; ddlState.DataBind(); ddlState.Items.Insert(0, "Choose One..."); chklistInrest.DataSource = intrest.ShowAllIntrest(); chklistInrest.DataTextField = "Interest"; chklistInrest.DataBind(); ddlIncome.DataSource = income.ShowAllIncome(); ddlIncome.DataTextField = "Income"; ddlIncome.DataBind(); ddlIncome.Items.Insert(0, "Choose One..."); ddlIndustry.DataSource = industry.ShowAllIndustry(); ddlIndustry.DataTextField = "IndustryType"; ddlIndustry.DataBind(); ddlIndustry.Items.Insert(0, "Choose One..."); ddlOccupation.DataSource = occupation.ShowAllOccupation(); ddlOccupation.DataTextField = "Occupation"; ddlOccupation.DataBind(); ddlOccupation.Items.Insert(0, "Choose One..."); }
protected void Page_Load(object sender, EventArgs e) { if (Session["JobSeekerId"] == null) { Response.Redirect("~/frmJobSeekerLogin.aspx"); } if (!IsPostBack) { ddlCountry.DataSource = country.ShowCountry(); ddlCountry.DataTextField = "CountryName"; ddlCountry.DataValueField = "CountryId"; ddlCountry.DataBind(); ddlCountry.Items.Insert(0, "---Select---"); ddlState.DataSource = state.ShowAllState(); ddlState.DataTextField = "StateName"; ddlState.DataValueField = "StateId"; ddlState.DataBind(); ddlState.Items.Insert(0, "---Select---"); ddlCity.DataSource = city.ShowAllCity(); ddlCity.DataTextField = "CityName"; ddlCity.DataValueField = "CityId"; ddlCity.DataBind(); ddlCity.Items.Insert(0, "---Select---"); BindData(); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["UserName"] == null) { Response.Redirect("~/Admin/frmAdminLogin.aspx"); } if (!IsPostBack) { ddlCountryName.DataSource = country.ShowCountry(); ddlCountryName.DataTextField = "CountryName"; ddlCountryName.DataValueField = "CountryId"; ddlCountryName.DataBind(); ddlCountryName.Items.Insert(0, "---Select---"); GridView1.DataSource = state.ShowAllState(); GridView1.DataBind(); GridView1.Visible = false; } lblMsg.Text = ""; }
private void BindGridview() { GridView1.DataSource = state.ShowAllState(); GridView1.DataBind(); }