如何隐藏母版页中的链接 [英] how to hide link in master page
本文介绍了如何隐藏母版页中的链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在母版页中使用过css菜单.我想在登录后隐藏一些链接
在这里我使用了像
这样的菜单
- 家
- home
- 管理员
- 学生>
i used css menu in master page., i want to hide some links after i did login
here i used menu like
推荐答案
如果您的链接在母版页中,则需要从母版页中找到这些控件,然后将其隐藏.
试试:
If your links are in master page then you need to find those controls from Master page and then hide them.
Try:
LinkButton lb = this.Master.FindControl("myHelpLink") as LinkButton;
if(lb != null)
lb.Visible = false;
通过数据库使用基于角色的动态菜单生成.它会解决您的问题.
请点击以下链接找到您的解决方案:
http://aspsol.blogspot.in/2011/08/role-based-dynamic- menue.html [^ ]
^ ]
http://pranabmitra.wordpress .com/2012/01/05/dynamic-menu-binding-by-using-javascript-css-in-asp-net/ [
Hi,
Work with role based dynamic menu generation from database. It''ll solve your problem.
Follow the links below to find your solution:
http://aspsol.blogspot.in/2011/08/role-based-dynamic-menue.html[^]
http://weblogs.asp.net/jgalloway/archive/2008/01/26/asp-net-menu-and-sitemap-security-trimming-plus-a-trick-for-when-your-menu-and-security-don-t-match-up.aspx[^]
http://pranabmitra.wordpress.com/2012/01/05/dynamic-menu-binding-by-using-javascript-css-in-asp-net/[^]
All the best.
--Amit
这篇关于如何隐藏母版页中的链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文