I have a <ASP:Label ID="lblDashboardLink" runat="server" /> located on a MasterPage named MasterBase.
From a page using this MasterPage, how can I access this label or any other items I need?
'VB.NET
'(From the child .aspx page)
Master.FindControl("lblDashboardLink"). <-- but don't see an option to change URL
I’ve been googling and I keep finding this same method, but it’s focusing more on User Controls it looks like… Can anyone guide me in the right direction here?? I’m so used to MVC!
Master.FindControl(“lblDashboardLink”) always returns a
Control(see MSDN). So all you have to do is cast it to Label. Then you may access any properties of a Label. Anyway there is no URL property in a label…