How to access a control in the masterpage ?

Suppose you have a label control name lblMessage in your masterpage and you want to access the label control from one of your pages, you can do so using the following code


Ctype( Page.Master.FindControl("lblMessage"),Label).Text = "Hello"

One Response to “How to access a control in the masterpage ?”

  1. hey thanks for the brilliant post! The resource will hlp me that for sure. Will there be any update on this post BTW? I have added you and have subscribed.

Leave a Reply