悬赏园豆:5
[已关闭问题]
<pre><span id="Code_Open_Text_103530" style="display: none"><div class="cnblogs_code"><pre><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> WbHttpModule : IHttpModule<br /> {<br /><br /><br /> </span><span style="color: #0000FF;">#region</span><span style="color: #000000;"> IHttpModule Members</span><span style="color: #000000;"><br /><br /> </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> Dispose()<br /> {<br /> </span><span style="color: #008000;">//</span><span style="color: #008000;">throw new NotImplementedException();</span><span style="color: #008000;"><br /></span><span style="color: #000000;"> }<br /><br /> </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> Init(HttpApplication context)<br /> {<br /> </span><span style="color: #008000;">//</span><span style="color: #008000;">throw new NotImplementedException();</span><span style="color: #008000;"><br /></span><span style="color: #000000;"> context.EndRequest </span><span style="color: #000000;">+=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> EventHandler(Begin_Request);<br /> }<br /><br /> </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> Begin_Request(</span><span style="color: #0000FF;">object</span><span style="color: #000000;"> sender, EventArgs e)<br /> {<br /> HttpApplication app </span><span style="color: #000000;">=</span><span style="color: #000000;"> sender </span><span style="color: #0000FF;">as</span><span style="color: #000000;"> HttpApplication;<br /> HttpContext context </span><span style="color: #000000;">=</span><span style="color: #000000;"> app.Context;<br /> HttpResponse response </span><span style="color: #000000;">=</span><span style="color: #000000;"> context.Response;<br /> </span><span style="color: #008000;">//</span><span style="color: #008000;">response.Write("<script type='text/javascript'>setTimeOut(alert('欢迎大家光临本站!'), 10000);</script>");</span><span style="color: #008000;"><br /></span><span style="color: #000000;"> </span><spa