Click here to Skip to main content
15,893,722 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i used css menu in master page., i want to hide some links after i did login
here i used menu like
  • home
  • admin
  • student>



    i didnt use linkbutton
    Posted
    Updated 1-Jul-12 20:21pm
    v3

    If your links are in master page then you need to find those controls from Master page and then hide them.

    Try:
    C#
    LinkButton lb = this.Master.FindControl("myHelpLink") as LinkButton;
    if(lb != null)
      lb.Visible = false;
     
    Share this answer
     
    Comments
    _Amy 2-Jul-12 2:29am    
    I have a confusion. If the number of links are not defined then at that condition what we'll have to do? Should we go for "Role Based Dynamic Menu" or not?
    Sandeep Mewara 2-Jul-12 4:39am    
    Depends. One can hide static menu item links based on roles too!

    Dynamic creation as it's own advantages and disadvantages. One has to evaluate and then go for an option.

    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