Exemplo n.º 1
0
    public void fillddlCountry()
    {
        DataTable dt = new DataTable();

        dt = objCountry.GetCountry();
        ddlCountry.DataSource     = dt;
        ddlCountry.DataValueField = "CountryID";
        ddlCountry.DataTextField  = "CountryName";
        ddlCountry.DataBind();
        ddlCountry.Items.Insert(0, new ListItem("Select a Country", "0"));
    }
Exemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["CustomerID"] == null)
        {
            Response.Redirect("UserLogin.aspx");
        }
        else
        {
            if (!IsPostBack)
            {
                common.DropDownMasterBind((DropDownList)ddlcountry, objcountry.GetCountry(), "CountryName", "CountryID");
                common.DropDownMasterBind((DropDownList)ddlstate, objState.GetStateByCountryID(Convert.ToInt32(ddlcountry.SelectedValue)), "StateName", "StateID");
                common.DropDownMasterBind((DropDownList)ddlcity, objcity.GetCityByStateID(Convert.ToInt32(ddlstate.SelectedValue)), "CityName", "CityID");

                Fill_Details();
                fillAccountDetails();
            }
        }
    }