Home All Groups Group Topic Archive Search About

debugging a databind that is actually working?

Author
14 Jan 2006 12:43 AM
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

Author
14 Jan 2006 1:02 AM
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

AddThis Social Bookmark Button