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 26: 
Line 27:     Private Sub Page_PreRender(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.PreRender
Line 28:         Dim strResult As String = Left(Liste.SelectedItem.Cells(4).Text, 300)
Line 29: 
Line 30:         If strResult <> "" Then

Source File: D:\vhosts\h152013.winweb23.servicehoster.ch\public_html\fotos_details.aspx.vb    Line: 28

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) +7704152
   System.Web.UI.WebControls.DataGridItemCollection.get_Item(Int32 index) +13
   System.Web.UI.WebControls.DataGrid.get_SelectedItem() +46
   fotos_details.Page_PreRender(Object sender, EventArgs e) in D:\vhosts\h152013.winweb23.servicehoster.ch\public_html\fotos_details.aspx.vb:28
   System.Web.UI.Control.OnPreRender(EventArgs e) +8788774
   System.Web.UI.Control.PreRenderRecursiveInternal() +80
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842


Version Information: Microsoft .NET Framework Version:2.0.50727.9061; ASP.NET Version:2.0.50727.9062