Server Error in '/' Application.

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:


Line 86:                 }
Line 87:                 // do not generate a link for the current page
Line 88:                 pages[currentPage - 1] = new PageUrl((currentPage).ToString(), "");
Line 89:                 
Line 90:                 

Source File: d:\Inetpub\vhosts\beta123.co.uk\allframe.co.uk\UserControls\Pager.ascx.cs    Line: 88

Stack Trace:


[IndexOutOfRangeException: Index was outside the bounds of the array.]
   UserControls_Pager.Show(Int32 currentPage, Int32 howManyPages, String firstPageUrl, String pageUrlFormat, Boolean showPages) in d:\Inetpub\vhosts\beta123.co.uk\allframe.co.uk\UserControls\Pager.ascx.cs:88
   UserControls_ProductList.PopulateControls() in d:\Inetpub\vhosts\beta123.co.uk\allframe.co.uk\UserControls\ProductList.ascx.cs:190
   UserControls_ProductList.Page_Load(Object sender, EventArgs e) in d:\Inetpub\vhosts\beta123.co.uk\allframe.co.uk\UserControls\ProductList.ascx.cs:20
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428


Version Information: Microsoft .NET Framework Version:2.0.50727.8974; ASP.NET Version:2.0.50727.8975