I want to set the selecteditem
attribute for an ASP.Net dropdownlist control programmatically.
So I want to pass a value to the dropdownlist control to set the selected item where the item is equal to the passed value.
I want to set the selecteditem
attribute for an ASP.Net dropdownlist control programmatically.
So I want to pass a value to the dropdownlist control to set the selected item where the item is equal to the passed value.
On load of My Windows Form the
comboBox
will display theClassName
column of myDataTable
as it's theDisplayMember
also has itsValueMember
(not visible to user) with it.If you need to select your list item based on an expression:
Here is the code I was looking for :
Or