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 105:                if (Request.QueryString["questionId"] != null)
Line 106:                {
Line 107:                    QuestionId = Convert.ToInt32(Request.QueryString["questionId"]);                    
Line 108:                }
Line 109:                %>

Source File: e:\WebApp\eLearning\Views\Tutorial\QuestionAnswer.aspx    Line: 107

Stack Trace:


[FormatException: Input string was not in a correct format.]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +14542542
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +174
   System.Convert.ToInt32(String value) +64
   ASP.views_tutorial_questionanswer_aspx.__RenderContent1(HtmlTextWriter __w, Control parameterContainer) in e:\WebApp\eLearning\Views\Tutorial\QuestionAnswer.aspx:107
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +276
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
   ASP.views_shared_static_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\dfa548d1\138f3309\App_Web_static.master.639c3968.kwmqtz33.0.cs:0
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +276
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +169
   System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer) +75
   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.4676.0