Server Error in '/' Application.

There is no row at position 0.

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: There is no row at position 0.

Source Error:


Line 151:                    {
Line 152:                        thelightsystem.respuesta precios = func.llenar_dataset("select PrecioRegular, PrecioFinal, DescuentoPorcentaje from producto_web where productoid = " + p.ID);
Line 153:                        precioRegular = func.convertirADouble(precios.data.Tables[0].Rows[0]["PrecioRegular"].ToString());
Line 154:                        precioFinal = func.convertirADouble(precios.data.Tables[0].Rows[0]["PrecioFinal"].ToString());
Line 155:                        descuento = func.convertirADouble(precios.data.Tables[0].Rows[0]["DescuentoPorcentaje"].ToString());

Source File: c:\inetpub\vhosts\thelightsystem.com\httpdocs\websitev2\producto.aspx    Line: 153

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +2508478
   System.Data.DataRowCollection.get_Item(Int32 index) +20
   ASP.websitev2_producto_aspx.__RenderContent2(HtmlTextWriter __w, Control parameterContainer) in c:\inetpub\vhosts\thelightsystem.com\httpdocs\websitev2\producto.aspx:153
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +276
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
   ASP.websitev2_websitev2_master.__Renderform1(HtmlTextWriter __w, Control parameterContainer) in c:\inetpub\vhosts\thelightsystem.com\httpdocs\websitev2\websitev2.Master:237
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +276
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +11659743
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +47
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +53
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +169
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +169
   System.Web.UI.Page.Render(HtmlTextWriter writer) +40
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4239


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