I'm learning how to work with Master pages here to redo our interface. one of the thing i want to do is pass some title, header, footer info from the content page to the master page, since that info changes from page to page.
I've read this article that i find relaly useful : http://www.odetocode.com/Articles/450.aspx
and in it, it explains that i can create a property in the masterpage to transfert info back & forth between the master page and the content page.
Now, i created my properties alright and it compiles, but my content page won't see it, it wont see the new properties. I've done everything the article says, can someone tell me what im doing wrong ? I'm guessing it has something to do with our namespace structure but i dont see why the new properties cannot be seen if everything compiles properly.
Here are a few snapshots from the code :
'Master page
<%@ Master Language="VB" AutoEventWireup="true" CodeBehind="Interdec.master.vb" Inherits="Interdec.UILayer.Interdec" %>
Public Partial Class Interdec
Inherits System.Web.UI.MasterPage
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Public Property PageTitle() As String
Get
Return lblTitle.InnerText
End Get
Set(ByVal value As String)
lblTitle.InnerText = value
End Set
End Property
End Class
'Login page
<%@ Page Language="vb" MasterPageFile="~/Interdec.Master" AutoEventWireup="true"
Codebehind="Login.aspx.vb" Inherits="Interdec.UILayer.Login.Login"
EnableSessionState="False" enableViewState="True"%>
<%@ MasterType VirtualPath="~/Interdec.Master" %>
Public Overrides Sub FillLabels()
With MyBase.Resources
Master.ClaimantName = "wahtever" 'does not work
Master.Page.Title = .GetString("3257") & " - " & .GetString("3009")
End Sub