473,748 Members | 4,067 Online
Bytes | Software Development & Data Engineering Community
+ 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 4784
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*******@disc ussions.microso ft.com> wrote in message
news:D2******** *************** ***********@mic rosoft.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*******@disc ussions.microso ft.com> wrote in message
news:D2******** *************** ***********@mic rosoft.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
2270
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
4050
by: Andreas Klemt | last post by:
Hello, for what is Page.DataBind useful and what is it doing? Thanks for any answer! Andreas
10
11608
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, but there is a DataBinding event. Thanks. AU
7
3231
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 write my own Page.DataBind() to step through and only bind to visible controls, or is there a better solution?
1
1511
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 MyLabel.databind() (or actually Page.DataBind()), I set Text to "". This doesn't work because then the databind comes along and redefines the Text attribute.
1
1484
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 Page_Load event to create objects which are then used for data binding, but because I call Page.DataBind in the parent page, the ascx Page_Load event doesn't complete and its objects are null references, so I get errors.
2
332
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> getText is just a static method we use to retrieve the strings from the db by populating a DataReader.
4
1823
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 runat="server">
3
1394
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 codebehind, other than define the function, to allow this to bind. Recently, I built a project at home, using Visual Studio 2005 (same as work), and none of the binding happened until I explicitly called Page.Databind within the page load event...
0
8991
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8830
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9324
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9247
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6796
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6074
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3313
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2783
muto222
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.