I am developing an application. Most of the pages include a form to
insert data, griview to display, selecting a record in gridview to
edit or delete...
But, I have different roles to users of my application. Some users are
allowed to add, edit and delete. Some to add only. Some to add and
edit.
How can I create roles and disable them to perform an action based on
the role. Truly say, button based security.
How can I achieve this.
Thanks in advance
You need to look at the
MembershipProvider
and more importantly
the
RoleProvider
btnEdit.Enabled = RoleProvider.IsUserInRole("Admin")
http://msdn.microsoft.com/en-us/library/system.web.security.roleprovider.isuserinrole.aspx
My code above will not work until after you have RESEARCHED and implemented
a RoleProvider.
DotNet 2.0 and above has a default one. Google it, there are a billion
articles about it.
But hopefully, this will get you on the right track.
<mrajani...@gmail.com> wrote in message
news:95c70ff6-2e4c-4707...@e53g2000hsa.googlegroups.com...