这是做一个导出Excel的功能,一点击导出excel就弹出下面的页面。还请各路前辈看看如何解决,感谢!
“/”应用程序中的服务器错误。
输入字符串的格式不正确。
说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.FormatException: 输入字符串的格式不正确。
源错误:
行 38: string ID = Aclick.ID;
行 39: string strWhere = txtStrWhere.Value.ToString();
行 40: int page = Convert.ToInt32(txtPage.Value.ToString());
行 41: int rows = Convert.ToInt32(txtRowsNum.Value.ToString());
行 42: using (ZSDService zsd = new ZSDService())
源文件: C:\Users\Administrator\Desktop\ZSDKKPTWeb\ZSDKKPTWeb\JZF\GJFX.aspx.cs 行: 40
堆栈跟踪:
[FormatException: 输入字符串的格式不正确。]
System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +11013491
System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +145
System.Convert.ToInt32(String value) +43
ZSDKKPTWeb.JZF.GJFX.print(Object sender, EventArgs e) in C:\Users\Administrator\Desktop\ZSDKKPTWeb\ZSDKKPTWeb\JZF\GJFX.aspx.cs:40
System.Web.UI.HtmlControls.HtmlAnchor.OnServerClick(EventArgs e) +116
System.Web.UI.HtmlControls.HtmlAnchor.RaisePostBackEvent(String eventArgument) +101
System.Web.UI.HtmlControls.HtmlAnchor.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +9664706
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724
版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.34209
