I have an aspx page that inherits a master page which has a protected property. Like this:
masterpage
{
protected string propX..
}
MyPage : masterpage
—myControl:UserControl
In myControl code-behind I’d like to access propX
Any ideas?
Thanks!
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.
Maybe try to cast the
Pageproperty ofmyControlclass toMyPageclass?And if you want to access this property from other class (like
myControl), the access modifier of propertypropXshould be set tointernalorpublicI’ve assumed, that you’ve placed
myControlobject onMyPagepage.