In asp.net, how can I access the master page controls in a non-master page?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can access the Masterpage as a property on your current page. However, the controls on your master page are protected so you can’t access them directly. But you can access them by using
FindControl(string name). The code you need to use depends on if the control is inside or outside a content place holder.