6+Handling the "file size too big "

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

6+Handling the "file size too big "

Guest-43
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

making a "file size too big" error page or whatever

Guest-43
Sorry about that first post there, cat jumped on the keyboard...

Anywho, I was wondering how to, as your manual puts it, add "a handler for the HttpApplication.Error event"
I'm a bit new to all of this, thanks in advance though
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 6+Handling the "file size too big "

Dean Brettle
Administrator
In your Global.asax.cs or Global.asax.vb, look for a method called Application_Error().  If you have one, it is probably already a handler for HttpApplication.Error and you can just modify it.  Otherwise, create the method like this:

        protected void Application_Error(Object sender, EventArgs e)
        {
       ...
        }

You might need to add it as a handler by adding something like this to the Global constructor:

this.Error += new System.EventHandler(this.Application_Error);

--Dean

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 6+Handling the "file size too big "

Guest-43
I figured out that first part by googling, but it wasn't doing much of anything.  Thank you!
Loading...