Asp.net 4 Webforms Authorization using attribute

261 views Asked by At

Hiii All, I'm a little bit newbie to ASP.net, I'm building a web application using asp.net 4, I got into authorization aspects, I have read some articles related to this concept, But none of them comes with what I want.

I don't want to use web.confing to implement authorization concept, what I want to use is attribute level authorization.

I would like to have the ability to something like this.

[AdminAuthorization]
public partial class Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
}

Please don't provide me with another scenario, and please be patient because I have said I'm still newbie.

0

There are 0 answers