Thanks for other community members useful input.
By the way, you actually can instruct the ASP.NET page parser to generate a
strongly typed Master property in the content page by adding an @
MasterType directive:
<%@ MasterType VirtualPath="~/MasterPage.master" %>
Then you can directly use "Master.MyLabelText" to access the public
property of the master page without type cast.
However, since the Label control on the master page is protected, you still
need to wrap its Text property in a public property, like MyLabelText in
vMike's sample code.
I also think GTB's approach is better if you have several master pages.
Hope this helps. Please feel free to post here if anything is unclear.
Regards,
Walter Wang (
[email protected], remove 'online.')
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.