Server Error in '/' Application.

Index 0 is either negative or above rows count.

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 0 is either negative or above rows count.

Source Error:


Line 13:         'Dim dsLocalidad As DataSet = ObtenerLocalidad(Nothing, urlLocalidad, ObtenerIdiomaActual())
Line 14:         Dim localidadDataView As DataView = GetLocalidad(urlLocalidad)
Line 15:         Dim idLocalidad As Integer = localidadDataView(0).Item("idLocalidad")
Line 16:         AreaBannersLateralIzquierdo.IdLocalidad = idLocalidad
Line 17:         AreaBannersLateralDerecho.IdLocalidad = idLocalidad

Source File: C:\inetpub\wwwroot\guiadecabanias.com\Localidades\GaleriaFotos.aspx.vb    Line: 15

Stack Trace:


[IndexOutOfRangeException: Index 0 is either negative or above rows count.]
   System.Data.DataView.GetRow(Int32 index) +2147855
   System.Data.DataView.get_Item(Int32 recordIndex) +16
   Localidades_GaleriaFotos.Page_Load(Object sender, EventArgs e) in C:\inetpub\wwwroot\guiadecabanias.com\Localidades\GaleriaFotos.aspx.vb:15
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


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