I am trying to access the value of a dropdown list that is in my .master page from a function.
I've found some instruction which gets me close (I hope). The only piece that gives me trouble is specifying the master page to use -- "Page.Master" or "Me.Master" doesn't work since I'm this function does not reside in a nested page. The message I get now (about Page.Master) is: "Reference to a non-shared member requires an object reference".
How can I resolve this so that I am able to get the dropdowns selected item? Thanks in advance.
Here is the code on my .master.vb page:
Public Property IdentityText() As String Get Return AlternateID.SelectedValue End Get End Property
This is from my function (securityaccess.vb):
Dim Master As MasterPage = Page.Master Dim Dropdown As DropDownList = master.FindControl("AlternateID") Dim ID As String = Dropdown.SelectedValue.ToString