Click here to Skip to main content
15,896,118 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
Hi To Every One.

i had already developed the Web Application.

---->i have the Following Pages 5 pages like

1)pageone.aspx
2)pagetwo.aspx
3)pagethree.aspx
4)pagefour.aspx
5)pagefive.aspx


--->i have the following roles

1)ADMIN
2)HR
3)DTP
4)Operational Manager.


My Requierment is ADMIN can view all the Pages . HR Only view the Some Pages , Some pages are visible for only Some roles.



Please Help me . this is very urgent to me . the username, password , rolls are dynamically comes.
Posted

If you're using Asp.net 4.5 or above then you can use latest SimpleMembership.

SimpleMembership, Membership Providers, Universal Providers and the new ASP.NET 4.5 Web Forms and ASP.NET MVC 4 templates

or else (older versions) you can use ASP.NET Membership and Role Provider.

ASP.NET Membership and Role Provider
 
Share this answer
 
Comments
Nanaji Annamreddi 15-Apr-14 2:48am    
Actually i was not use the membership control . Actually my problem is accessing the pages. admin can view all the pages . but remaining peoples only view some pages in our project . Please
be give sollution ASAP.
A solution could be to implement your Custom Site Map Provider by extending StaticSiteMapProvider class, and based on the user roles the site map will contains the "site map nodes" for some pages or not.

You can find details and code provided by me for other QA Question Master Pages in Asp.Net Web forms[^]
 
Share this answer
 
v2
Comments
Nanaji Annamreddi 15-Apr-14 7:27am    
With out Change from my old code is there any solution please give. solution in C# . ASP.Net
Raul Iloc 15-Apr-14 7:29am    
My solution is for ASP.NET and C# and you have to do no change in your current pages. You have only to add a new class (I provided example in my link) and to add changes in the master page.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900