Reputation: 213
I'm trying to extract the selected value from a a DropDownList
as a string
as follows:
if ((ASPxComboBox1.SelectedItem.Value).ToString = "Selection")
This is not working. Please let me know if there is a away of getting each selected string extracted?
Upvotes: 0
Views: 1758
Reputation: 47726
Your syntax seems odd but try (I am assuming c# because you didn't specify the language your using):
if (ASPxComboBox1.SelectedValue.Equals("Selection"))
In your code you are doing an assignment and assigning the text "Selection" to ToString
which shouldn't even compile.
Also you named it a combobox but ASP.NET does not have a combobox just a dropdownlist...
Upvotes: 1