Ok, here is my MasterPage:
<%@ Master Language="VB" AutoEventWireup="true" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head runat="server">
<title>PaxMondeo</title>
<meta name="description" content="PaxMondeo VB.Net ASP.Net Web Site Development SQL Server Adelaide South Australia"/>
<!--[if IE 5]>
<style type="text/css">
.sidebarcontainer td, .sidebarcontainer tr {font-size:smaller;}
#subnav a {height:1em;}
body td, body th {font-size:0.78em;}
</style>
<![endif]-->
<!--[if IE 7]>
<style type="text/css">
#rightcolumn{margin-right: -152px;}
</style>
<![endif]-->
</head>
<body runat="server">
<form id="headForm" method="get" action="http://www.google.com/search">
<div id="headwrapper">
<div id="header">
<div id="logo">
<asp:Image ID="logoImage" SkinID="logoImage" runat="server" />
</div>
<div id="banner">
<asp:Label ID="lblSlogan" runat="server" SkinID="slogan" />
</div>
<div id="search" align=right>
<input type="text" name="q" size="15" maxlength="255" value="" style="border-right: #ff284e thin solid; border-top: #ff284e thin solid; font-size: 1em; border-left: #ff284e thin solid; border-bottom: #ff284e thin solid" />
<input type="submit" value="Google Search" style="border-right: #ffffff thin solid; border-top: #ffffff thin solid; font-size: 0.9em; border-left: #ffffff thin solid; border-bottom: #ffffff thin solid; background-color: #ff284e" /><br />
<input type="checkbox" name="sitesearch" value="paxmondeo.com" checked="checked" />
Search PaxMondeo<br />
</div>
</div>
</div>
</form>
<form id="mainForm" runat="server">
<div id="wrapper">
<div id="mainnav">
<asp:Menu ID="menuMain" SkinID="mainmenu" runat="server" Orientation="Horizontal" />
</div>
<div id="contentwrapper">
<div id="floatwrapper">
<div id="centercolumn">
<div id="breadcrumbs">
<asp:SiteMapPath runat="server" ID="smPath" />
</div>
<div id="copy">
<asp:ContentPlaceHolder runat="server" ID="mainCopy">
<%-- Main content goes here
--%>
</asp:ContentPlaceHolder>
</div>
</div>
<div id="leftcolumn">
<div id="leftcolcontainer">
<div id="subnav">
<asp:SiteMapDataSource runat="server" ID="subnavSitemap" StartingNodeOffset="1" StartFromCurrentNode="false" ShowStartingNode="false" />
<asp:Menu runat="server" ID="subMenu" SkinID="subMenu" DataSourceID="subnavSitemap" />
</div>
<asp:ContentPlaceHolder ID="leftColumn" runat="server">
<%-- Left sidebar content placeholder. Again the
individual boxes are created by using a <div> and
assigning a class to it: 'sidebarcontainer'.
Follow the structure of the sample content below:
<div class="sidebarcontainer">
<h4>Headline</h4>
<p>Content</p>
</div>
--%>
<div class="sidebarcontainer">
</div>
<div class="sidebarcontainer">
<h4>
Quick Links</h4>
<ul>
<li><a href="Contact.aspx" title="Contact Us">» Contact Us</a></li>
</ul>
<br />
</div>
<div class="sidebarcontainer">
<asp:Login ID="Login1" runat="server" Width="120px">
<LayoutTemplate>
<h4>Log In</h4>
<asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName"><u>U</u>ser Name:</asp:Label><br />
<asp:TextBox ID="UserName" runat="server" AccessKey="u" TabIndex="60" Columns="15" />
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="Login1">*</asp:RequiredFieldValidator><br />
<asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password"><u>P</u>assword:</asp:Label><br />
<asp:TextBox ID="Password" runat="server" TextMode="Password" Columns="15" AccessKey="p" TabIndex="61" />
<asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="Login1">*</asp:RequiredFieldValidator><br />
<asp:CheckBox ID="RememberMe" runat="server" Text="Remember me next time." TabIndex="62" AccessKey="r" /><br />
<span style="color: red">
<asp:Literal ID="FailureText" runat="server" EnableViewState="False" />
</span>
<div align="right"><asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Log In" AccessKey="l" TabIndex="63" ValidationGroup="Login1" />
</div>
</LayoutTemplate>
</asp:Login>
</div>
</asp:ContentPlaceHolder>
</div>
</div>
</div>
<div id="rightcolumn">
<div id="rightcolcontainer">
<asp:ContentPlaceHolder ID="rightColumn" runat="server">
<%-- Right sidebar content placeholder. Again the
individual boxes are created by using a <div> and
assigning a class to it: 'sidebarcontainer'.
Follow the structure of the sample content below:
<div class="sidebarcontainer">
<h4>Headline</h4>
<p>Content</p>
</div>
--%>
<div class="sidebarcontainer">
<asp:Repeater ID="rptrBlog" runat="server">
<HeaderTemplate>
<h4>
Blog</h4>
</HeaderTemplate>
<ItemTemplate>
<h5>
<asp:label runat="server" ID="lblBlogTitle" Text='<%# DataBinder.Eval(Container.DataItem, "BlogTitle") %>' />
<asp:label runat="server" ID="lblBlogDate" Text='<%# DataBinder.Eval(Container.DataItem, "BDate") %>' />
</h5>
<p>
<asp:label runat="server" ID="lblBlogText" SkinID="BlogText" Text='<%# DataBinder.Eval(Container.DataItem, "BText") %>' />
</p>
<div class="readmore"><a href='Blog.aspx?item=<%# DataBinder.Eval(Container.DataItem, "BlogTitle") %>' title="More info">» more</a></div>
</ItemTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:Repeater>
</div>
</asp:ContentPlaceHolder>
</div>
</div>
<div class="footer">
© Copyright 2007 PaxMondeo.
</div>
<div class="PaxMondeo">
Web Site Created by <a href="http://www.PaxMondeo.com" title="PaxMondeo">PaxMondeo</a>, Adelaide, South Australia
</div>
</div>
</div>
</form>
</body>
</html>
Here, for example is a stripped down Default.aspx.vb
Imports System.Net.Dns
Imports System.Reflection.MethodBase
Partial Class _Default
Inherits Microsoft.Web.DynamicDataControls.DynamicDataPage
<System.Web.Services.WebMethod()> <System.Web.Script.Services.ScriptMethod()> Public Shared Function GetSlides() As AjaxControlToolkit.Slide()
Return New AjaxControlToolkit.Slide() {New AjaxControlToolkit.Slide("images/World.bmp", "World", "World"), New AjaxControlToolkit.Slide("images/World.bmp", "World", "World"), New AjaxControlToolkit.Slide("images/World.bmp", "World", "World"), New AjaxControlToolkit.Slide("images/World.bmp", "World", "World"), New AjaxControlToolkit.Slide("images/World.bmp", "World", "World"), New AjaxControlToolkit.Slide("images/Australia.bmp", "Australia", "Australia"), New AjaxControlToolkit.Slide("images/SA.bmp", "SA", "SA"), New AjaxControlToolkit.Slide("images/Part SA.bmp", "Part SA", "Part SA"), New AjaxControlToolkit.Slide("images/Gt Adelaide.bmp", "Gt Adelaide", "Gt Adelaide"), New AjaxControlToolkit.Slide("images/Adelaide.bmp", "Adelaide", "Adelaide"), New AjaxControlToolkit.Slide("images/Adelaide.bmp", "Adelaide", "Adelaide"), New AjaxControlToolkit.Slide("images/Adelaide.bmp", "Adelaide", "Adelaide"), New AjaxControlToolkit.Slide("images/Adelaide.bmp", "Adelaide", "Adelaide"), New AjaxControlToolkit.Slide("images/Adelaide.bmp", "Adelaide", "Adelaide")}
End Function
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim strHost As String
Try
If Not IsPostBack Then
Utilities.SetMeta(Header, "description", "PaxMondeo Web ASP.Net VB.Net SQL Server Development Adelaide South Australia")
End If
Catch ex As Exception
Utilities.SendMessage("[email protected]", "Error in PaxMondeo Web Site", "Error " & ex.ToString & " in " & GetCurrentMethod.Name)
End Try
End Sub
End Class
And as mentionedbefore, here is SetMeta:
Public Shared Sub SetMeta(ByRef Header As System.Web.UI.HtmlControls.HtmlHead, ByVal strName As String, ByVal strText As String)
Dim Meta As HtmlMeta = New HtmlMeta
For Each control As HtmlControl In Header.Controls
If control.TagName = "meta" Then
Meta = control
If Meta.Name = strName Then
Meta.Content = strText
End If
End If
Next
End Sub
Kind regards,
Rob