Server Error in '/' Application.

Input string was not in a correct format.

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.FormatException: Input string was not in a correct format.

Source Error:


Line 36:             Dim IDCorso As Integer = CType(rw.FindControl("HFID"), HiddenField).Value
Line 37:             Dim Immagine As String = CType(rw.FindControl("HFImmagine"), HiddenField).Value
Line 38:             Dim IscrizioneCorsiOnline As Boolean = System.Configuration.ConfigurationManager.AppSettings("IscrizioneCorsiOnline")
Line 39: 
Line 40:             If IscrizioneCorsiOnline = True Then

Source File: D:\web_custorino\_Applicativi\Corsi\Box\ElencoCorsiSezioni.ascx.vb    Line: 38

Stack Trace:


[FormatException: Input string was not in a correct format.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value, NumberFormatInfo NumberFormat) +308
   Microsoft.VisualBasic.CompilerServices.Conversions.ToBoolean(String Value) +201

[InvalidCastException: Conversion from string "" to type 'Boolean' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToBoolean(String Value) +390
   _Applicativi_Corsi_Box_ElencoCorsiSezioni.LVCorsi_PreRender(Object sender, EventArgs e) in D:\web_custorino\_Applicativi\Corsi\Box\ElencoCorsiSezioni.ascx.vb:38
   System.Web.UI.Control.OnPreRender(EventArgs e) +11728868
   System.Web.UI.Control.PreRenderRecursiveInternal() +132
   System.Web.UI.Control.PreRenderRecursiveInternal() +227
   System.Web.UI.Control.PreRenderRecursiveInternal() +227
   System.Web.UI.Control.PreRenderRecursiveInternal() +227
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3671


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