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 53: 			((HtmlAnchor)e.Item.FindControl("lnk")).HRef = "/"+language+"/"+pageTinyurl+"/_"+id+".aspx";
Line 54: 			
Line 55: 			if (query.Length>0 && query.Split('_')[1]==id.ToString()) 
Line 56: 				((HtmlGenericControl)e.Item.FindControl("item")).Attributes["class"] = "sel";
Line 57: 		}

Source File: d:\inetpub\webs\acronosarredamenticom\UserControls\relations\promotions.ascx    Line: 55

Stack Trace:


[IndexOutOfRangeException: Index was outside the bounds of the array.]
   ASP.usercontrols_relations_promotions_ascx.ListBinding(Object s, RepeaterItemEventArgs e) in d:\inetpub\webs\acronosarredamenticom\UserControls\relations\promotions.ascx:55
   System.Web.UI.WebControls.Repeater.OnItemDataBound(RepeaterItemEventArgs e) +107
   System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +136
   System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +435
   System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +53
   System.Web.UI.WebControls.Repeater.DataBind() +75
   ASP.usercontrols_relations_promotions_ascx.Page_Load(Object s, EventArgs e) in d:\inetpub\webs\acronosarredamenticom\UserControls\relations\promotions.ascx:32
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +43
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Control.LoadRecursive() +163
   System.Web.UI.BasePartialCachingControl.LoadRecursive() +45
   System.Web.UI.Control.LoadRecursive() +163
   System.Web.UI.Control.LoadRecursive() +163
   System.Web.UI.Control.LoadRecursive() +163
   System.Web.UI.Control.LoadRecursive() +163
   System.Web.UI.Control.LoadRecursive() +163
   System.Web.UI.Control.LoadRecursive() +163
   System.Web.UI.Control.LoadRecursive() +163
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2587


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