• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 563
  • 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


Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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