Hi
Is it possible to alter the visible property of hyperlinks on a masterpage at runtime?
thanks
Hi
Is it possible to alter the visible property of hyperlinks on a masterpage at runtime?
thanks
No, if you set visible=False then it won't even display in the HTML output of the page. You would need to use javascript to hide/show the hyperlinks instead.
If you expose the hyperlink as a property on the master page, you can get a reference to a pages master and cast that to your specific master page then set visibility of the hyperlinks using that property.
In your master page have something like this:
Public ReadOnly Property RemitViewerLink() As HyperLink
Get
Return hlRemitViewer
End Get
End Property
Then in your child page you can do this
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
Dim MyMaster As MasterPage = DirectCast(Page.Master, MasterPage)
MyMaster.RemitViewerLink.CssClass = "selectedMenuItem" 'or set visibility
End Sub