Server Error in '/' Application.

Nullable object must have a value.

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: Nullable object must have a value.

Source Error:


Line 165:                                    lblFinalizada.Text = "This lot belongs to the Auction on the date " + laSubasta.FechaRealizacion.Value.ToString("yyyy/MM/dd");
Line 166:                                else
Line 167:                                    lblFinalizada.Text = "This lot belongs to the Auction finished on the date " + laSubasta.FechaRealizacion.Value.ToString("yyyy/MM/dd");
Line 168:                            }
Line 169:

Source File: h:\webspace\hostings\salamoyua.com\hosting\www\en\lote.aspx.cs    Line: 167

Stack Trace:


[InvalidOperationException: Nullable object must have a value.]
   System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) +56
   System.Nullable`1.get_Value() +2787358
   en_lote.CargarLote(String idLote) in h:\webspace\hostings\salamoyua.com\hosting\www\en\lote.aspx.cs:167
   en_lote.Page_Load(Object sender, EventArgs e) in h:\webspace\hostings\salamoyua.com\hosting\www\en\lote.aspx.cs:30
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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