Click to See Complete Forum and Search --> : How i control in some contents in the page


honeyboy_20
October 6th, 2009, 02:36 AM
Hi ,

i make administration web page to my site where i make permissions to all users but in the page level i want to control in some contents in the page , for example the edit button appear to admin but not appear in normal user .

All the best,

honeyboy_20
October 6th, 2009, 02:01 PM
??/

darwen
October 6th, 2009, 04:13 PM
You should look up ASP.NET Forms Authentication (see here (http://www.asp.net/learn/MVC/tutorial-17-cs.aspx)).

You'll need an SQL server to support the default authentication. SQL Express will do.

Then you can identify as part of the Page_Load event on any page whether a user has logged in or not, and what their roles are (administrator, guest etc).

If their role is administrator and you have your 'edit' button as an asp.net control you can make it visible in the Page_Load event.

This is too big a subject to be covered in one post on a forum - please read the documentation you'll find on the net.

Darwen.