Click here to Skip to main content
15,888,286 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I have a menu list on a master page as following

HTML
<ul id="menu">
	<li><a href="../AdminHome.aspx">Home</a></li>
	<li>
		<a>Master</a>
		<ul>
			<li>
				<a href="../AddEmp.aspx">Employee</a>				
			</li>
			<li>
				<a href="../MstUser.aspx">User</a>
							
			</li>
			<li>
				<a href="../Dept.aspx">Department</a>
						
			</li>
			<li>
				<a href="../Designation.aspx">Designation</a>					
			</li>
			<li>
			<a href="../Company.aspx">Company</a>
			</li>
			<li>
			<a href="../State.aspx">State</a>
			</li>
			<li>
			<a href="../City.aspx">City</a>
			</li>
			<li>
			<a href="../MstItem.aspx">Item</a></li>
			<li>
			<a href="../MstRole.aspx">Role</a>
			</li>
			<li>
			<a href="../MstHoliday.aspx">Holiday</a>
			</li>
			<li>
			<a href="../MstSubItem.aspx">SubItem</a>
			</li>
			<li>
			<a href="../MstItemBrand.aspx">Item Brand</a>
			</li>
		</ul>
	</li>
	
	
</ul>

I want to create a page on which I could assign access some menu item to user by check or uncheck item name so that when user login,user can access only those pages which are assigned to the user.
Posted
Updated 30-May-12 20:59pm
v2
Comments
Rajesh Kariyavula 31-May-12 3:21am    
What difficulty are you facing in creating the Access Rights page. Please mention so that we could find a solution.
Ed Nutting 31-May-12 3:31am    
This just looks like you haven't tried... If a user is logged in, have a member status recorded against that user. Then use an if/elseif or switch block to check which pages you should add to the list based on what that status allows them to access. Finally, on all pages check if the user is actually allowed to access those pages.

Ed

1 solution

 
Share this answer
 
Comments
Ed Nutting 31-May-12 3:47am    
Good answer (or many answers ;p). My 5+ (Sometimes I feel enquirers are a bit spoilt on CP really...I mean do we really have to search stuff for them? :/ )
codeBegin 31-May-12 4:53am    
5'ed

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