I want to pass another value to the method LeCmb_Statut_SelectedIndexChanged, how can I proceed?
I have the code:
SqlDataReader reader = comm.ExecuteReader();
while (reader.Read())
{
...
DropDownList LeCmb_Statut = new DropDownList();
string tempLabel = reader["LIBELLE"].ToString();
string templabelVeh = reader["LIBVEH"].ToString()
}
How can I pass these temp variables into LeCmb_Statut_SelectedIndexChanged
?
LeCmb_Statut.SelectedIndexChanged += new EventHandler(LeCmb_Statut_SelectedIndexChanged);
You could use the Tag property of dropdownlist. first, create a simple DTO:
then:
then inside the LeCmb_Statut_SelectedIndexChanged: