New tests.
[mono.git] / mcs / class / System.Web / Test / standalone / Unhandled_Exception_Global_Asax / test_03 / global.asax.cs
1 using System;
2 using System.Collections;
3 using System.ComponentModel;
4 using System.Web;
5 using System.Web.SessionState;
6
7 namespace TestWebApp
8 {
9         public partial class Global : System.Web.HttpApplication
10         {
11                 protected virtual void Application_Error (Object sender, EventArgs e)
12                 {
13                         HttpResponse response = Response;
14
15                         if (response != null) {
16                                 string begin = (string)AppDomain.CurrentDomain.GetData ("BEGIN_CODE_MARKER");
17                                 string end = (string)AppDomain.CurrentDomain.GetData ("END_CODE_MARKER");
18                                 response.Write (begin + "<strong>Application error handled</strong>" + end);
19                         }
20                         Server.ClearError ();
21                 }
22         }
23 }