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 192:                string GBSize = string.Format("{0} GB", size / 1024 / 1024);
Line 193:                image = GetImage(NewFileName);
Line 194:                sbText.AppendFormat("<a href='../../UploadFiles/News/" + NewFileName + "' title='Click to view more' target='_blank'><img src='{2}' title='{3}' height='190' alt=''><br/><strong>{0}</strong></a><br/><span class='size'> File Size: {1}</span><br/>", Title, GBSize == "0 GB" ? (MBSize == "0 MB" ? KBSize : MBSize) : GBSize, image.Split(':')[0], image.Split(':')[1]);
Line 195:
Line 196:            }

Source File: c:\inetpub\vhosts\unnaonpp.in\httpdocs\Dynamic\Common\NewsList.aspx.cs    Line: 194

Stack Trace:


[IndexOutOfRangeException: Index was outside the bounds of the array.]
   Dynamic_Common_NewsList.rptSearchResult_ItemDataBound(Object sender, RepeaterItemEventArgs e) in c:\inetpub\vhosts\unnaonpp.in\httpdocs\Dynamic\Common\NewsList.aspx.cs:194
   System.Web.UI.WebControls.Repeater.OnItemDataBound(RepeaterItemEventArgs e) +139
   System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +193
   System.Web.UI.WebControls.Repeater.AddDataItemsIntoItemsArray(IEnumerable dataSource, Boolean useDataSource) +291
   System.Web.UI.WebControls.Repeater.PostGetDataAction(IEnumerable dataSource) +109
   System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +81
   Dynamic_Common_NewsList.PopulateSearchGrid(Int32 currentPageNo) in c:\inetpub\vhosts\unnaonpp.in\httpdocs\Dynamic\Common\NewsList.aspx.cs:63
   Dynamic_Common_NewsList.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\unnaonpp.in\httpdocs\Dynamic\Common\NewsList.aspx.cs:53
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


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