Server Error in '/' Application.

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.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Source Error:


Line 120:                //throw new ApplicationException(oSectionProducts.Count.ToString() + " :: " + iPreviousIndex.ToString() + " :: " + iNextIndex.ToString());
Line 121:
Line 122:                page oNextPage = (page)oSectionProducts[iNextIndex];
Line 123:                page oPreviousPage = (page)oSectionProducts[iPreviousIndex];                
Line 124:

Source File: c:\inetpub\vhosts\turnerandcox.co.uk\httpdocs\template_furniture.aspx    Line: 122

Stack Trace:


[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
   System.Collections.ArrayList.get_Item(Int32 index) +14555104
   ASP.template_furniture_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\inetpub\vhosts\turnerandcox.co.uk\httpdocs\template_furniture.aspx:122
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +117
   System.Web.UI.Page.Render(HtmlTextWriter writer) +39
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8753


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3930.0