Saturday, July 15, 2023

Dropdown List Value concept


select colu,colu from table 



string k1 = "select Department_Name, Department_id from Department_mast";

        cm = new SqlCommand(k1, cn);

        dr = cm.ExecuteReader();

        ddldeptname.DataSource = dr;

        ddldeptname.DataTextField = "Department_Name";

        ddldeptname.DataValueField = "Department_id";

        ddldeptname.DataBind();

        ddldeptname.Items.Insert(0, "select");

        dr.Close();








Label1.Text = DropDownList1.SelectedItem.Value;


datatexfield

datavaluefield




dl.selecteditem.tex


d1.selecteditem.value 


No comments:

Post a Comment

GRIDVIEW ON ROW DATA BOUND EVENT

 Database Create  Student : roll , name , city , cost  Fix 6 Value  in Database Record  ====================================================...