• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 598
  • Last Modified:

Index was outside the bounds of the array.

Index was outside the bounds of the array.
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.IndexOutOfRangeException: Index was outside the bounds of the array.

Source Error:

        string[] xFN = new string[10];
        string[] xFV = new string[10];

Line 146:        for (int i = 1; i < 11; ++i)
Line 147:        {
Line 148:            xFN[i] = Request.QueryString["xFN" + i.ToString()];
Line 149:            xFV[i] = Request.QueryString["xFV" + i.ToString()];
Line 150:            if (!String.IsNullOrEmpty(xFN[i]) && !String.IsNullOrEmpty(xFV[i]))

Source File: c:\AceSA_12_12_2009\AceSA_12_12_2009\Prod\AnyTable.aspx    Line: 148

Stack Trace:

[IndexOutOfRangeException: Index was outside the bounds of the array.]
   ASP.prod_anytable_aspx.ParamWhere() in c:\AceSA_12_12_2009\AceSA_12_12_2009\Prod\AnyTable.aspx:148
   ASP.prod_anytable_aspx.GetDataInGridFromAccess() in c:\AceSA_12_12_2009\AceSA_12_12_2009\Prod\AnyTable.aspx:119
   ASP.prod_anytable_aspx.Page_Load() in c:\AceSA_12_12_2009\AceSA_12_12_2009\Prod\AnyTable.aspx:21
   System.Web.Util.CalliHelper.ArglessFunctionCaller(IntPtr fp, Object o) +8
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +8669175
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

1 Solution
goodkAuthor Commented:
Oops I found the error. The index had to be 12
  string[] xFN = new string[12];
        string[] xFV = new string[12];
Problem resolved please close this thread - thanks

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now