你可以用try{}
catch{}来控制阿,在catch{}中控制你输出到你自己的页面就可以了,我觉得这样满方便的\1

解决方案 »

  1.   

    TO  fifakiki(fifakiki) 
    这个地球人全知道啊!!不知你们有没有试过上传文件!!!
    当文件大小大于machine.config中定义的大小时它根本就回不了CS来执行了,直接就出了一个HTML出错页面
      

  2.   

    这个是web上传的老问题了
    谁有办法搞个断点续传就好了
      

  3.   

    好像在Web.Config中配置参数就可以了,请问有谁知道如何配置参数?我在本网站曾经看到过。
      

  4.   

    try in global.asax:<%@ Application Language="C#" %>
    <script runat="server" >
    public void Application_Error(object sender, EventArgs e)
    {
      Response.Redirect("SomeError.aspx");
    }
    </script>
      

  5.   

    here is how you tell whether the error is from large upload:
    <%@ Application Language="C#" %>
    <script runat="server" >
    void Application_Error(Object sender, EventArgs E) 
    {
    string s = "error2.aspx";//default error page
    foreach (Exception ex in Context.AllErrors)
    {
    if (ex.Message.ToLower().IndexOf("maximum request length exceeded.") > -1)
    s = "error.aspx"; //for large upload error
    }        Context.ClearError();
            Response.Redirect(s);
    }
    </script>
      

  6.   

    文件大小由maxRequestLength控制 默认为4096
    <configuration>
        <system.web>
           <httpRuntime maxRequestLength="409600"/>
       </system.web>
    <configuration>
      

  7.   

    学习! jellycool (jelly)  可以把你做好的程序提供下载吗????
        
      

  8.   

    <configuration>
        <system.web>
           <httpRuntime maxRequestLength="409600"/>
       </system.web>
    <configuration>写到WEBCONFIG文件中!
      

  9.   

    自定义错误页面
    <configuration>
    <system.web>
    <customErrors defaultRedirect="/xxx.aspx" />
    <error statusCode="404" redirect="/xxx.htm" />
    </system.web>
    </configuration>
      

  10.   

    webconfig
    <configuration>
        <system.web>
            <customErrors defaultRedirect="错误提示页面.aspx" mode="on"/>
        </system.web>
    </configuration>