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 48:         if (Request.QueryString["bigclassid"] == null)
Line 49:         {
Line 50:             SqlCommand comm = new SqlCommand("select * from type where typeid=" + Int32.Parse(Request.QueryString["typeid"]??""), conn);
Line 51:             SqlDataReader adr = comm.ExecuteReader();
Line 52:             if (adr.Read())

Source File: s:\Bnt_NanJingLongxiao\department.aspx.cs    Line: 50

Stack Trace:


[FormatException: Input string was not in a correct format.]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +14292453
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +305
   department.showdaohang() in s:\Bnt_NanJingLongxiao\department.aspx.cs:50
   ASP.kfzx_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in s:\Bnt_NanJingLongxiao\kfzx.aspx:45
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +131
   System.Web.UI.Page.Render(HtmlTextWriter writer) +40
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5363


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