Solved

any idea

Posted on 2016-11-07
3
21 Views
Last Modified: 2016-11-26
Any idea on how to fix this in vb?

[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]


Message: Out of Range
Error Status: 500
Error Number: 385040
Error Type: System.ArgumentOutOfRangeException
0
Comment
Question by:shwelopo
  • 2
3 Comments
 
LVL 33

Accepted Solution

by:
paulmacd earned 250 total points (awarded by participants)
ID: 41877106
You're looking for an item in a list by its index number.  The number you're using is not a valid list index.  That could be for any number of reasons, and there's not enough information here to say why.

Start by verifying the length (how many items are in the list) of the list.  Then verify the index you're looking for.
1
 
LVL 62

Assisted Solution

by:Fernando Soto
Fernando Soto earned 250 total points (awarded by participants)
ID: 41877149
The best that can be said about this is that you are attempting to access an Array or List or some object that takes an index but the index you are attempting to use is outside the valid range. For example if you have an array that can be accessed with and index between 0 and 100 the only valid indexes that can be used in any integer between 0 and 100 inclusive, so using an index of -1 or 101 fall outside the valid range and will give the error you are getting.

Please post the code where this error is happening.
1
 
LVL 62

Expert Comment

by:Fernando Soto
ID: 41902206
Both solutions would be where to look with this error.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now