473,472 Members | 2,143 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Page.DataBind()

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
2 4744
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Mike | last post by:
For ASP .Net display of a protected value what's better <%# %> (with DataBinding) or the ASP <%= %>? Is one more efficent or is there no difference? Thank you.
1
by: Andreas Klemt | last post by:
Hello, for what is Page.DataBind useful and what is it doing? Thanks for any answer! Andreas
10
by: aualias | last post by:
This seems like such a lame question, but how do you bind to a CheckBox with ASP.NET? With Windows Forms there is a DataBindings collection. I do not see it with the web version of the control,...
7
by: Martin | last post by:
Hi, I have a page where according to the mode of use, different controls are visible. I had assumed that Page.DataBind() would only bind visible controls, but apparently not. Do I have to...
1
by: Martin | last post by:
Hi, I've got a web label control which I set a databind expression on the Text attribute in the html for the page (aspx file). At runtime, I want to override this attribute, so before I do...
1
by: Tomislav Bartolin | last post by:
Hi, I have an aspx page which contains an ascx user control. I am using Page.DataBind in Page_Load event of the page to bind elements to page properties. The problem is the ascx uses its...
2
by: lbolognini | last post by:
Hi all, I've chosen to render localized messages in my web app with using databind. Every string has something like this: <label id="foo" text='<%# getText(LangID, MessageCode) %>'></label> ...
4
by: Arpan | last post by:
The following code works fine: <script runat="server"> Dim strName As String = "Arpan" Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs) Page.DataBind() End Sub </script> <form...
3
by: HockeyFan | last post by:
I'm fairly new to ASP.Net. All the projects that I've worked on lately have allowed binding to items on the page, via such as <%# FunctionReturnsAString() %>. However, I had to do nothing in my...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.