Error setting SelectedValue

T

tshad

We have a situation that is a little strange.

We have a DropDownList which has 8 items the values are 0-7.

If we do:

cboLocation.Selected = "0";

This works the first time but the second time we do that we get an error:

"'cboLocation' has a SelectedValue which is invalid because it does not
exist in the list of items.\r\nParameter name: value"

In the debugger, you can see that all the values are still there (including
"0").

Now if I change the value to "3", I can do it 10 times and no error. If I
change it back to "0", I get the error again.

Why is that????

Thanks,

Tom
 
S

stanlj

Tried to duplicate your problem and could not. Also my DropDownList does not
not have a Selected property tho if there was one, i would think that would
be take a true/false value. Did u ever figure this out?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top