首页 新闻 赞助 找找看

try catch 在catch中跳转,可是跳转出现错误.然后....

0
[待解决问题]

然后就出现这个东西了....

代码是这样子的:在Global.asax

    protected void Application_BeginRequest(object sender, EventArgs e)
    {

 

          //判断请求的内容长度是否超过了设置的字节数
        if (context.Request.ContentLength > maxRequestLength)
        {

    try
            {
               if (!cs.Contains("error"))
                    Server.Transfer(this.Request.Url.LocalPath + "?" + cs + "&error=" + Server.UrlEncode("请上传小于10M的文件"));
                else
                    Server.Transfer(this.Request.Url.LocalPath + "?" + cs);
            }
            catch (Exception ex)
            {


            }

     }

  }

白了头发就是代价的主页 白了头发就是代价 | 初学一级 | 园豆:7
提问于:2014-09-05 12:07
< >
分享
所有回答(2)
0

这个~~~从错误来说,看不出什么,从你的代码来看,也看不出什么啊。

519740105 | 园豆:5810 (大侠五级) | 2014-09-05 13:44
0

Server.Transfer 是执行一个页面的代码,不是跳转!

Alex_QY1987 | 园豆:1888 (小虾三级) | 2014-09-09 17:32
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册