By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,463 Members | 774 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,463 IT Pros & Developers. It's quick & easy.

Page.DataBind()

P: n/a
Hello, when I place the command of "Page.Databind()" into my program, the program generates and error saying "value was outside of range". If I take the instruction out, then the page displays and does not abend. Of course the fields that I want to display data do not have data on them

I have 5 instructions which are of the <%# %> variety. If I take all of them out, and leave in the page bind, the same error occurs. I have seached the page for "value" and the only hits I get are the "value" attribute for the dropdown boxes

What else should I be looking at to find "Specified argument was out of the range of valid values. Parameter name: value " error

Thanks in advance for your assistance.........
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hello Jim,

Can you send the stack trace of the exception? This will help to determines
which control is raising the error.

"Jim Heavey" <an*******@discussions.microsoft.com> wrote in message
news:D2**********************************@microsof t.com...
Hello, when I place the command of "Page.Databind()" into my program, the program generates and error saying "value was outside of range". If I take
the instruction out, then the page displays and does not abend. Of course
the fields that I want to display data do not have data on them.
I have 5 instructions which are of the <%# %> variety. If I take all of them out, and leave in the page bind, the same error occurs. I have
seached the page for "value" and the only hits I get are the "value"
attribute for the dropdown boxes.
What else should I be looking at to find "Specified argument was out of the range of valid values. Parameter name: value " error?
Thanks in advance for your assistance.........

Nov 18 '05 #2

P: n/a
One idea: when you set the datasource for your cbo, do you also set a
SelectedValue?
Comment that out and then try binding.

I think that the Items collection of many controls is not filled until you
call databind so you cannot set things like SelectedValue until after the
call to databind.
--
Joe Fallon

"Jim Heavey" <an*******@discussions.microsoft.com> wrote in message
news:D2**********************************@microsof t.com...
Hello, when I place the command of "Page.Databind()" into my program, the program generates and error saying "value was outside of range". If I take
the instruction out, then the page displays and does not abend. Of course
the fields that I want to display data do not have data on them.
I have 5 instructions which are of the <%# %> variety. If I take all of them out, and leave in the page bind, the same error occurs. I have
seached the page for "value" and the only hits I get are the "value"
attribute for the dropdown boxes.
What else should I be looking at to find "Specified argument was out of the range of valid values. Parameter name: value " error?
Thanks in advance for your assistance.........

Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.