debugging a databind that is actually working?

  • Thread starter Thread starter darrel
  • Start date Start date
D

darrel

I am getting this error:

System.ArgumentOutOfRangeException: Specified argument was out of the range
of valid values. Parameter name: value

specifically on the line where I am databinding data to a DDL.

The odd thing is that the data *is* being binded. If I run the page, my DDL
is being populated with the data. So, how do I figure out what is happening
here? It's failing on the one line that apparently is doing it's job.

-Darrel
 
System.ArgumentOutOfRangeException: Specified argument was out of the
range
of valid values. Parameter name: value

specifically on the line where I am databinding data to a DDL.

The odd thing is that the data *is* being binded. If I run the page, my
DDL is being populated with the data. So, how do I figure out what is
happening here? It's failing on the one line that apparently is doing it's
job.

SOLUTION!:

You need to set SelectedValue to Nothing before databinding

from: http://west-wind.com/weblog/posts/2068.aspx

Any idea why that fixes it? And, since it does, should one always get in the
habit of setting the selected value to nothing before databinding?

-Darrel
 

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

Back
Top