How do i access a masterpage hyperlink control from a content page in asp.net 4.0 using vb?
minhaajmuntasir.edoo
0
Newbie Poster
Recommended Answers
Jump to PostHello-
To access a control in the master page, here is one approach.
The code isnt tested, just writing from memory..
VB.NET
Dim cph As ContentPlaceHolder = DirectCast(Me.Master.FindControl("ContentPlaceHolder1"), ContentPlaceHolder) Dim hyp As Hyperlink = DirectCast(cph.FindControl("hyperlinkId"), Hyperlink) hyp.Visible = True
C# (for anyone else that may come …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.