Ejemplo n.º 1
0
 public void State_Bind()
 {
     DropDownList_state.DataSource     = bs.bs_statebind();
     DropDownList_state.DataTextField  = "SNAME";
     DropDownList_state.DataValueField = "SID";
     DropDownList_state.DataBind();
 }
Ejemplo n.º 2
0
 public void state()
 {
     DropDownList_state.DataSource     = bs.bs_state();
     DropDownList_state.DataTextField  = "STATE";
     DropDownList_state.DataValueField = "SID";
     DropDownList_state.DataBind();
 }
 public void fillstate()
 {
     cmd.CommandText = "Select * from tblstate";
     dt = da.GetRecords(cmd);
     DropDownList_state.DataSource     = dt;
     DropDownList_state.DataTextField  = "st_name";
     DropDownList_state.DataValueField = "st_id";
     DropDownList_state.DataBind();
     DropDownList_state.Items.Insert(0, new ListItem("Select State", "0"));
 }
Ejemplo n.º 4
0
    protected void StateBind()
    {
        SqlConnection con = new SqlConnection(str);
        SqlCommand    cm  = new SqlCommand();

        cm.CommandText = "dd_state";
        cm.CommandType = CommandType.StoredProcedure;
        cm.Connection  = con;

        SqlDataAdapter ad = new SqlDataAdapter(cm);
        DataTable      dt = new DataTable();

        ad.Fill(dt);

        DropDownList_state.DataSource     = dt;
        DropDownList_state.DataTextField  = "SNAME";
        DropDownList_state.DataValueField = "SID";
        DropDownList_state.DataBind();
    }