"If at first you don't succeed; call it version 1.0" :-Unknown

Pages

Thursday, April 29, 2010

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”

Have a nice day... 'N happy Coding :)

Adobe Dreamweaver CS4Adobe Dreamweaver CS5Adobe Dreamweaver CS4 Upgrade [Mac]

1 comment:

Bindhya said...

Nice post, Arun.

Thanks :-)