xbabigyrlx
08-30-2006, 08:44 PM
I am using a databound drop down list and want to set the first item in the list to be selected. I have tried ddlSelectLocation.SelectedIndex = 0; this is selected the first item in my list but I am unable to retrieve the value.
I am using the following code in my SelectedIndexChanged event:
Session["Loc"] = ddlSelectLocation.SelectedItem.Value.ToString();
Label1.Text = Session["Loc"].ToString();
this is working fine.... how do I get to this for the first item in my list on page load....
Any help is appreciated... Thanks in advance
I am using the following code in my SelectedIndexChanged event:
Session["Loc"] = ddlSelectLocation.SelectedItem.Value.ToString();
Label1.Text = Session["Loc"].ToString();
this is working fine.... how do I get to this for the first item in my list on page load....
Any help is appreciated... Thanks in advance