title: Access Parent Page Property from User Control
body: <p>Trying to access a property from the parent page on my user control.</p>
  
  <p>Here's the start of my default.asp codebehind:</p>
  
  <pre><code>Partial Class _Default
       Inherits System.Web.UI.Page
  
       Private _selectedID As String = "74251BK3232"
  
       Public Property SelectedID() As String
            Get
                 Return _selectedID 
            End Get
            Set(ByVal value As String)
                 _selectedID = value
            End Set
       End Property
  </code></pre>
  
  <p>Here's the start of my user control codebehind:</p>
  
  <pre><code>Partial Class ctrlAddAttribute
      Inherits System.Web.UI.UserControl
       Dim selectedID As String = Me.Parent.Page.selectedID()
  </code></pre>
  
  <p>I'm getting the error "selectedID is not a member of System.Web.UI.Page"</p>
  
  <p>Please adivse!</p>