mgmhicks
asked on
Retrieve page public property from jquery
I have a master page with the following code.
Public Property UserType As String
Get
Return mUserType
End Get
Set(value As String)
mUserType = value
End Set
End Property
Now I can of course access that property when a page loads. So when I load the content page, I assign the usertype ="P"
So after content page loads I need jquery on Master page to run that looks at the usertype and hides a <ul> with the ID of "type"
So I need a document.ready script on the master page that can get the value of usertype and either hide or show based on the value c or p
I know how to do it with a control, but not sure with a property value.
thanks
Public Property UserType As String
Get
Return mUserType
End Get
Set(value As String)
mUserType = value
End Set
End Property
Now I can of course access that property when a page loads. So when I load the content page, I assign the usertype ="P"
So after content page loads I need jquery on Master page to run that looks at the usertype and hides a <ul> with the ID of "type"
So I need a document.ready script on the master page that can get the value of usertype and either hide or show based on the value c or p
I know how to do it with a control, but not sure with a property value.
thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In your .aspx, add a Hidden field
Open in new window
In your .aspx.vb file, change the code of UserType property as below:
Open in new window