Server Error in '/' Application.

Invalid attempt to read when no data is present.

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.InvalidOperationException: Invalid attempt to read when no data is present.

Source Error:


Line 34:         dr.Read()
Line 35:         
Line 36:         HyperLink2.Text = dr.Item("tabname")
Line 37:         HyperLink2.ToolTip = dr.Item("tabname")
Line 38:         HyperLink2.NavigateUrl = "/" & dr.Item("nombrecorrecto") & "/" & dr.Item("tabid") & ".aspx"

Source File: C:\IcneaWebs\W13\regalohogar.com\subcategoria.aspx    Line: 36

Stack Trace:


[InvalidOperationException: Invalid attempt to read when no data is present.]
   System.Data.SqlClient.SqlDataReader.GetValue(Int32 i) +137
   System.Data.SqlClient.SqlDataReader.get_Item(String name) +24
   ASP.subcategoria_aspx.Page_Load() in C:\IcneaWebs\W13\regalohogar.com\subcategoria.aspx:36
   System.Web.Util.CalliHelper.ArglessFunctionCaller(IntPtr fp, Object o) +5
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +858603
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436


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