View Single Post
  #2 (permalink)  
Old February 6th, 2008, 01:11 PM
joeller joeller is offline
Registered User
Join Date: Oct 2007
Location: Indian Head, MD, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

Listing 8-10 and 8-11 purport to show how a public property set on the master page using inline server-side code is accesible from the content page. However when I implement this code in my masterpage and content page like so;

 Dim m_sPageHeadingTitle As String = "HIFLD Web Site"
        Public Property PageHeadingTitle() As String
                Return m_sPageHeadingTitle
            End Get
            Set(ByVal value As String)
                m_sPageHeadingTitle = value
            End Set
        End Property

an on the content page;

<%@ Page Language="VB" MasterPageFile="~/HIFLDMaster.master" Title="HSIP Gold Request Form" %>
<%@ MasterType VirtualPath="~/HIFLDMaster.master" %>

<script runat="server" language="vb">
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)

        Me.Master.PageHeadingTitle = "HSIP Gold Request Form"
    End Sub


I get an error on the content page stating 'PageHeadingTitle' is not a member of 'System.Web.UI.MasterPage'. Were there changes made to ASP.Net 2.0 Master pages after the book was written that keeps this code from working?