Mr_Shaw
asked on
dropdown list select value
I have a dropdown list which I want to force it to select a specific value, is this possible.
Sure. Set the SelectedIndex, or find the item and set it's Selected property = True.
ASKER
There is no selected properted for a dropdown list. Please could you give me an example.
if data is already bound to dropdownlist hten ddlist.selectedindex = index
ASKER
I am binding the data from a database so I am not sure of the index value of the item i want to select.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I need the code to actually selct not just highlight the item in the list.
DropDownList1.Items.FindBy Text("text here").Selected=true;
DropDownList1.Items.FindBy Value("val ue here").Selected = true;
DropDownList1.Items.FindBy
ASKER
Ok thanks guys for your help.
I figured out the last part of the problem was the order in which I was calling my stored procedures.
I will dish out the point soon.
Thanks
I figured out the last part of the problem was the order in which I was calling my stored procedures.
I will dish out the point soon.
Thanks
ASKER
thanks