Click here to Skip to main content
15,914,500 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted

1 solution

Hi,

You can use Master.FindControl(); method to find controls of master pages.



Please check here
[MSDN link]

and
[Here ur ans] :)


HaCodi!!!
 
Share this answer
 
Comments
Member 10398773 26-Jan-14 9:14am    
Hi,it returns null.It cannot show the control.The control is inside login view in the masterpage under role group .Its a panel.Have used the code below
Panel mycontrol = (Panel)Page.Master. FindControl("StudentsPanel");
This does not return to me results.
Career Web Helper 31-Jan-14 5:28am    
Then you have to first find LOginView control then StudentsPanel :)

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