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 54:                           + " LEFT JOIN [EEF].[eefsys].[EventStatus] as e on a.Status = e.Code"
Line 55:                           + " Where a.Code = @0 ";
Line 56:                     var data = db.QuerySingle(sqlQ, Convert.ToInt32(id));
Line 57:                     var Ename = "";
Line 58: 

Source File: C:\inetpub\wwwroot\UAEERF.ae\en\Content\Jumping\ResultPage.cshtml    Line: 56

Stack Trace:


[FormatException: Input string was not in a correct format.]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +14524712
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +172
   System.Convert.ToInt32(String value) +60
   ASP._Page_en_Content_Jumping_ResultPage_cshtml.Execute() in C:\inetpub\wwwroot\UAEERF.ae\en\Content\Jumping\ResultPage.cshtml:56
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +99
   System.Web.WebPages.WebPage.ExecutePageHierarchy() +182
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +107
   System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext) +142


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