在ASP.Net事件发生之前 [英] Before event fire in ASP.Net
本文介绍了在ASP.Net事件发生之前的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
喜
,我们知道的 OnActionExecuting方法。
我只想知道我们可以为ASP实现相同的功能.net web application .net framework 4.5?
我的意思是,之前是否有任何事件消防技术?在每次事件发生之前我会做一些事情。
Hi
we know OnActionExecuting Method which is Called before the action method is invoked.
I just want to know can we implement same thing for ASP.net web application .net framework 4.5 ?
I mean ,is there any before event fire technique ?where I do some thing before every event fire.
推荐答案
Kuntal - 我想说,最好的考虑因素是创建一个自定义HTTP模块,如下所示。
http://stackoverflow.com/questions/16779970/onactionexecuting-equivalent-in-standard-asp-净 [ ^ ]
Al所以请注意,由于您使用的是ASP.NET页面,因此所有页面生命周期事件都将在每个帖子后面触发。
Kuntal - I would say, the best consideration would be creating a custom HTTP Module as below.
http://stackoverflow.com/questions/16779970/onactionexecuting-equivalent-in-standard-asp-net[^]
Also please note that since you are using ASP.NET Pages, all page life cycles events will be fired in each post backs.
这篇关于在ASP.Net事件发生之前的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文