G
Guest
Hi,
On my drop down list control, i am trying to set the
DropDownList1.SelectedValue property to the selected string value. In my
example, my DropDownList1 control contains three colors:
- Carlos
- Mike
- Susan
However, if i try to set the DropDownList1.SelectedValue = "carlos"; i get
the following error: "Exception: Specified argument was out of the range of
valid values. Parameter name: carlos." This is b/c "Carlos" != to "carlos".
I realize that i can convert all the drop down list controls values to
uppercase, however, i'd like to keep the names as they are entered by the
user.
Is there anyway to compare these strings, ignoring any differences in
uppercase or lowercase?
Thanks!
On my drop down list control, i am trying to set the
DropDownList1.SelectedValue property to the selected string value. In my
example, my DropDownList1 control contains three colors:
- Carlos
- Mike
- Susan
However, if i try to set the DropDownList1.SelectedValue = "carlos"; i get
the following error: "Exception: Specified argument was out of the range of
valid values. Parameter name: carlos." This is b/c "Carlos" != to "carlos".
I realize that i can convert all the drop down list controls values to
uppercase, however, i'd like to keep the names as they are entered by the
user.
Is there anyway to compare these strings, ignoring any differences in
uppercase or lowercase?
Thanks!