If you had a method in a web page that should only be callable by members of the Administrators role, you could enforce this one of two ways. The imperative approach would be to write a line of code like the following:public void DoSomethingPrivileged()
{
if (User.IsInRole(?Adminstrators?))
{
//do some privileged work
}
}you can use a declarative approach to security instead: [Princip ...
Go to the complete details ...