ASP.NET中过滤器的两种写法


ASP.NET #过滤器2014-04-05 11:23
1.在一个单独的类库中在web.config中进行配置
1<httpModules>
2  <add name="" type="类的全名称,程序集的名称"/>   <!--程序集的名称可省略-->
3</httpModules>

2.在Global.asax文件中进行配置
1protected void Application_BeginRequest(object sender, EventArgs e) {
2    // http://yige.org 可执行代码   
3}

相关文章

粤ICP备11097351号-1