catch抓到的错误信息在那里显示 用Response输出或转移到一个专门的错误提示页。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 try{}catch (InvalidCastException e) { Console.WriteLine("出错信息:"+e);} 可以定义一个专门显示错误信息的label如:<asp:label id="error" runat="server">catch(){ error.text=e.tostring();} try{}catch{ Response.Write("<script language=javascript>alert('出错信息');</script>");} 在catch块中处理catch(Exception e){Response.write (e.tostring());} try{////事件}catch(Exception e){Response.write (e.tostring());} c#怎样访问内网共享目录(有帐号的) C#中重载转换运算符语法中一个单词的意思 将XML数据填充到datatable 再将datatable数据绑定到datagridview中显示 怎么样去读USB上的证书。 字符串转换为int 关于datalist嵌套子层里的ItemCommand事件没有响应问题 动态表格显示问题 求大神帮忙解释一下工作原理? svn 方法 OPTIONS 失败于 “http://vmtemp/svn/test”: 无法连接到服务器 (http://vmtemp) 请教 2005 C# TreeNode问题 (高手赐教)怎么做菜单编辑器? 有关C#中变量的内存分配
{
}
catch (InvalidCastException e)
{
Console.WriteLine("出错信息:"+e);
}
{
error.text=e.tostring();
}
{
}
catch
{
Response.Write("<script language=javascript>alert('出错信息');</script>");
}
catch(Exception e)
{
Response.write (e.tostring());
}
{
////事件
}
catch(Exception e)
{
Response.write (e.tostring());
}