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 278:                                }
Line 279:                                picturediv.InnerHtml += @"<div class=""dvd""></div>";
Line 280:                                picturediv.InnerHtml += @"<a href=""" + picprefix + @"_" + u.ToString() + @"_L.jpg"" rel=""lightbox"" title=""" + trimDesc(pictextArray[u - 1]) + @""" style=""float:right;""><b>view all " + largepicCount + @" pictures &raquo;</b></a>";
Line 281:                                picturediv.InnerHtml += @"<div class=""dvd""></div>";
Line 282:                                i++;

Source File: c:\Domains\AccommodationDirect\Controls\sidepics.ascx.cs    Line: 280

Stack Trace:


[IndexOutOfRangeException: Index was outside the bounds of the array.]
   Controls_sidepics.Page_Load(Object sender, EventArgs e) in c:\Domains\AccommodationDirect\Controls\sidepics.ascx.cs:280
   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.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.5448; ASP.NET Version:2.0.50727.5456