Click here to Skip to main content
15,893,594 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi, friends, How r u doing todays. I am working on a web application. I have four a href menu (Eg.- Menu1 Menu2 Manu3 Menu4 ) items. I want to check the condition if customer is free then the menu "Menu4" should be invisible and if customer is paid then they can access or see all above manu (Eg.- Menu1 Menu2 Manu3 Menu4). Please give any idea if possible.
Thanks in advance!
Posted
Updated 24-May-13 4:43am
v3
Comments
Jameel VM 24-May-13 10:19am    
from where you can get details for checking customer is free or not? please elaborate the question
riteshsingh_jsr 24-May-13 10:21am    
from database i will check if the user is free then on login page they won't be able to see the Menu4 option.
Jameel VM 24-May-13 10:21am    
Post the menu items mark up also.
riteshsingh_jsr 24-May-13 10:22am    
not understand the solutions clearly.
Jameel VM 24-May-13 10:24am    
which control you are using.ASP.NET menu item?

1 solution

This is an anchor element, no different from other element in this respect.

Use, for example, jQuery .show()/.hide():
http://api.jquery.com/show/[^],
http://api.jquery.com/hide/[^].

This way, you can even animate showing and hiding, in a Cheshire Cat style: http://en.wikipedia.org/wiki/Cheshire_Cat[^] :-).

If you need to learn jQuery (highly recommended), please see:
http://en.wikipedia.org/wiki/JQuery[^],
http://jquery.com/[^],
http://learn.jquery.com/[^],
http://learn.jquery.com/using-jquery-core/[^],
http://learn.jquery.com/about-jquery/how-jquery-works/[^] (start from here).

—SA
 
Share this answer
 

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