using System; usingSystem.Collections.Generic; usingSystem.Web;//引用web命名空间 using System.Text; namespace xland { public classMyModule:IHttpModule//继承IHttpModules {
using System; using System.Collections; usingSystem.Configuration; using System.Data; using System.Web; usingSystem.Web.Security; using System.Web.UI; usingSystem.Web.UI.HtmlControls; usingSystem.Web.UI.WebControls; usingSystem.Web.UI.WebControls.WebParts; namespace _1 { publicpartial class _Default :System.Web.UI.Page { protected void Page_Load(object sender, EventArgse) { for (int i = 1; i < 10000;i++) { Response.Write(i); if (i % 100 == 0) {Response.Write("<br>");} } } } } BeginRequest和EndRequest里可以做很多事情 比如处理cookie的domain等 等具体需要的时候要能想到这里来