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 26:         {
Line 27:             string str = srd.ReadLine();
Line 28:             count = UInt32.Parse(str);
Line 29:         }
Line 30:         srd.Close(); 

Source File: d:\Code\gzdx2016\wssp\JSQ\count.ascx.cs    Line: 28

Stack Trace:


[FormatException: Input string was not in a correct format.]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +510
   System.Number.ParseUInt32(String value, NumberStyles options, NumberFormatInfo numfmt) +310
   System.UInt32.Parse(String s) +70
   JSQ_count.Page_Load(Object sender, EventArgs e) in d:\Code\gzdx2016\wssp\JSQ\count.ascx.cs:28
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +67
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +111
   System.Web.UI.Control.OnLoad(EventArgs e) +194
   System.Web.UI.Control.LoadRecursive() +233
   System.Web.UI.Control.LoadRecursive() +441
   System.Web.UI.Control.LoadRecursive() +441
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4368


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