Ok here is my code from my MasterPage so far:
VB Code:
Partial Class Header Inherits System.Web.UI.MasterPage Private mLanguage As String Private mDirective As String Public Property Directive() As String Get Return mDirective End Get Set(ByVal value As String) mDirective = value End Set End Property Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init Select Case Me.Directive Case "Products" Products.ImageUrl = "images/new_header/Menu_Items/Products_On.jpg" Case "About" About.ImageUrl = "images/new_header/Menu_Items/AboutUs_On.jpg" Case "Search" Search.ImageUrl = "images/new_header/Menu_Items/Search_On.jpg" Case "Employment" Employment.ImageUrl = "images/new_header/Menu_Items/Employment_On.jpg" Case "Contact" Contact.ImageUrl = "images/new_header/Menu_Items/Contact_On.jpg" End Select End Sub End Class
When my contentpage PreInit event fires, I would like it to change the Directive property of the MasterPage, but I'm not sure how to expose it from the contentpage.




Reply With Quote