473,698 Members | 2,170 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PagedDataSource , ArrayList, Repeater, Objects

I declare a PagedDataSource and make its data source be a arraylist that
contains objects that I've created myself. Then I bind a Repeater with this
PagedDataSource and an error occurs. The following is the error:

Index was out of range. Must be non-negative and less than the size of the
collection. Parameter name: index
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.Argument OutOfRangeExcep tion: Index was out of
range. Must be non-negative and less than the size of the collection.
Parameter name: index

Does anyone know why? Thank you in advance.
Nov 19 '05 #1
0 1444

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1356
by: Fresh Air Rider | last post by:
Could anyone please provide a code snippet demonstrating how to use the Repeater control in conjunction with the PagedDataSource class and a Strongly Typed Dataset ? I get an error informing me that my datasource does not implement ICollection. All examples of using the PagedDataSource class with the Repeater seem use untyped datasets.
1
4007
by: Jax | last post by:
I have an arraylist of objects. This arraylist is bound to a repeater. That repeater then creates a set of controls like so <asp:repeater id="garmentRepeater" runat="server" OnItemCommand="Repeater_ButtonClick"><HeaderTemplate><asp:Label id="Label1" style="Z-INDEX: 101; LEFT: 250px; POSITION: absolute; TOP: 80px" runat="server Width="200px" Height="50px" Font-Names="Impact" Font-Size="Large">Garments on...
1
2687
by: Fresh Air Rider | last post by:
Hi Fellow Dotnetters Could anyone please provide a code snippet demonstrating how to use the Repeater control in conjunction with the PagedDataSource class and a Strongly Typed Dataset ? I get an error informing me that my datasource does not implement ICollection. All examples of using the PagedDataSource class with the Repeater seem
1
1971
by: wrytat | last post by:
I have an arraylist storing objects that I've defined my own. The object is called Stock. And each stock has attributes like Comp, PartNo, Model, and etc. I want to bind this arraylist with a repeater. But I always get an error message: "No default member found for type Stock." This is where the error came from: <ItemTemplate>
4
1975
by: Alan Silver | last post by:
Hello, I'm trying to use an ArrayList to do data binding, but am getting an error I don't understand. I posted this in another thread, but that was all confused with various other problems, which could be why no-one answered it!! I've now narrowed the problem down, so am starting a new, more specific, thread. Sorry it's a bit long, but it's reasonably simple stuff. I have a page where I'm showing product details, including any
3
2550
by: Mark Jones | last post by:
I am quite new to ASP and .Net development and I am building a web-based multiple choice exam application. The web page displays the questions using a Repeater control and the answers are nested within the Repeater as RadioButtonLists. Simple enough I think. My data consists of a Question table and an Answer table. The Question table has a QuestionID and a Question field. The Answer table has a AnswerID field, an Answer field and a...
1
2248
by: Fred Dag | last post by:
I want to get the database table ID of a row in a Repeater that uses a PagedDataSource when OnTexctChanged event is fired. It seems that the DataSource property isn’t persisted when the event is triggered so I have to get the values from the database again. Correct? Or is there a way of hiding the row ID’s in the page?
1
7129
by: jazzart | last post by:
Hi there, I'm fairly new to programming with Asp.Net 2.0 so I'm finding myself regularly fumbling around in the dark a bit, so to speak. I'm currently using Visual Web Developer and have been following the www.asp.net data access tutorials to create a DAL and BLL to connect my web site (a simple real estate property search web site) to my database (Sql Express 2005).
1
1763
by: barryh | last post by:
I have an on-line catalogue that has a hierarchal category structure. I am using the PagedDataSource to wrap the business object along with the Repeater control to display the items in pages. The problem I am having is linking to an item that is not on the first page of a given category. What is the best approach to determining which page an item is on? Thanks
0
8671
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
9152
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9016
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8856
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...
0
7709
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6515
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
4360
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3037
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
2321
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.