首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

一:理解ASP.NET的运行机制(例:通过HttpModule来计算页面执行时间)

通过定制HttpModule来计算页面执行时间 当HttpApplication创建HttpModule时 将会执行HttpModule的Init方法 在这个方法中,可以订阅多个事件 如下: BeginRequest...application)//实现IHttpModules中的Init事件             {                //订阅两个事件                 application.BeginRequest... +=new EventHandler(application_BeginRequest);                application.EndRequest+=new EventHandler...(object sender, EventArgs e)            {                //object sender是BeginRequest传递过来的对象                 ...                if (i % 100 == 0) { Response.Write(""); }                }            }        }    } BeginRequest

46620
领券