J
Jim
Let's say we have a drop down list (lstStates) of the 50 states. Is there
another way to pre select a state, when the page loads, besides
lstStates.SelectedValue = "NY" for example?
The reason I'm asking is because when a value not in the 50 state master
list (for example, lstStates.SelectedValue = "TR"), the page erros out with a
"Specified argument was out of the range of valid values" error. I know the
correct answer is "well don't pass in TR" but that's another matter.
Is there another property of the DropDownList where if it's not in the
master list, it simply goes to the first item in the list? Or is there a
way/trick to handle this so the page doesn't error out.
Thanks in advance,
Jim
another way to pre select a state, when the page loads, besides
lstStates.SelectedValue = "NY" for example?
The reason I'm asking is because when a value not in the 50 state master
list (for example, lstStates.SelectedValue = "TR"), the page erros out with a
"Specified argument was out of the range of valid values" error. I know the
correct answer is "well don't pass in TR" but that's another matter.
Is there another property of the DropDownList where if it's not in the
master list, it simply goes to the first item in the list? Or is there a
way/trick to handle this so the page doesn't error out.
Thanks in advance,
Jim