I could not get your "MyMasterPage" logic to work. Here is how I
resolved it:
Dim mpLabel As Label
mpLabel = CType(Master.FindControl("PageTitle"), Label)
If Not mpLabel Is Nothing Then
mpLabel.Text = Me.Title
End If
This came from an example from Microsoft at:
http://msdn.microsoft.com/en-us/library/xxwa0ff0.aspx
Thanks for the help.
-Steve
On Oct 14, 7:30 am, kierenj <[EMAIL PROTECTED]> wrote:
> If your Master page type is called MyMasterPage, try something like
> this:
>
> MyMasterPage masterPage = (MyMasterPage)Page.Master;
> Label labelCtl = masterPage.PageTitle;
>
> labelCtl.Text = "Blah";
>
> ...But it seems to be missing the point of master pages - you should
> just define a content placeholder area in the master page, and define
> the content to go in it in the content page.
>
> On Oct 14, 3:05 am, Steve <[EMAIL PROTECTED]> wrote:
>
>
>
> > I have a master page and it has a Label control ID=PageTitle which I
> > want to have set to a unique value for each page I create in my
> > system. When I make pages that have that page as a master, how can I
> > set the PageTitle text value?
>
> > Thanks.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/DotNetDevelopment
You may subscribe to group Feeds using a RSS Feed Reader to stay upto date
using following url
<a href="http://feeds.feedburner.com/DotNetDevelopment">
http://feeds.feedburner.com/DotNetDevelopment</a>
-~----------~----~----~----~------~----~------~--~---