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!
Maybe try to cast the
Page
property ofmyControl
class toMyPage
class?And if you want to access this property from other class (like
myControl
), the access modifier of propertypropX
should be set tointernal
orpublic
I've assumed, that you've placed
myControl
object onMyPage
page.