Hi Imar,
When I place the code below in my masterpage 'masterpage.master.
vb' (I'm using VWD) I get a blue squigley line underneath MyMetaTag. When I hover over it I get the tooltip - Name 'MyMetaTag' is not declared.
any ideas what's wrong?
here's the code for 'masterpage.master.
vb'
Partial Class masterpage
Inherits System.Web.UI.MasterPage
' Other stuff, like Page_Load etc can go here
Public Property MetaData() As String
Get
Return MyMetaTag.Content
End Get
Set(ByVal value As String)
MyMetaTag.Content = value
End Set
End Property
End Class
Here's part of the MasterPage 'MasterPage.master'
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<meta name="keywords" content="" id="MyMetaTag" runat="server" />
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
And here's the testmonials codebehind file code
Partial Class testimonials
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles Me.Load
Dim myMaster As MasterPage = CType(Me.Master, MasterPage)
myMaster.MetaData = "Hello World"
End Sub
End Class
thanks,
Michael.