隐藏页面中的用户控件 [英] Hiding a user control in a page

查看:49
本文介绍了隐藏页面中的用户控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,我有一个用户控件Student,Admin,Teacher。我已根据他们的角色组将它们放在我的母版页中。教师和学生属于同一个角色即Staff.However,控件是超级链接的通知因此,学生不应该看到教师可以看到的链接。如何访问控件,如果用户像学生一样,控件会更改其链接并允许每个人看到不同的面板。目前,我有链接学生也可以看到我的工作人员面板。我怎么能解决这个问题?谢谢

Hello pals ,i have a user control Student,Admin,Teacher.I have placed them in my masterpage according to their role group.Teacher and Student belong to the same Role i.e Staff.However,the controls are inform of a hyperlink whereby a student is not supposed to see the links which teacher can see.How can i access the control such that if its a user like Student,the control changes its link and allows each to see different panel.Currently,the links which i have put in my Staff panel are also visible to a student.How can i solve this ?Thanks

推荐答案




你可以使用Master.FindControl();查找母版页控件的方法。






请点击这里

[ MSDN链接]




[ Here boys ans ]





HaCodi! !!


这篇关于隐藏页面中的用户控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆