In asp.net webfrom Is it possible to get the name of the event handler witch will be used to handle the user request using HttpModule
:
ex if the user click a button btn
i would like to get btn_Click
as the name of the event handler. That way i can restrict him if he is not allowed to do such action
Your way of solving the permissions problem is over complicated. There are more standart ways to decide whether a user can execute an action or not, such as writing the suitable logic in the event handlers themselves, not rendering the controls to un-authorized users, and using attributes to limit who can execute your methods, based on his permissions.
This article describes it from all the possible points of view
Your implementation is also possible, and checking that a button was clicked should be enough (why do you care for the event handler? you only need to know the button was clicked, and you can get this informatin from the underlying Request object), however this is really an overkill for a standart task in ASP.NET