Hi I have a problem with the Control tag <WroxUnitedMotd:MotdControl > Page 499, this control (after some difficulty compiling) is registered in the Project references.
I have added the line from the book <%@ Register TagPrefix="WroxUnitedMotd" Namespace="WroxUnited" Assembly="CustomMotdControl" %> however when I write the above tag there is no WroxUnitedMotd listed in the dropdown list and it can't be seen?
Server Error in '/WroxUnited1' Application.
--------------------------------------------------------------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type WroxUnited.MotdControl from assembly CustomMotdControl, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.
Source Error:
Line 47: <P>You can view our upcoming matches at-a-glance via the calendar to the
Line 48: right.</P>
Line 49: <WroxUnitedMotd:MotdControl id="WuMotd" Name="Matches today" runat="server" />
Line 50: </TD>
Line 51: <TD style="WIDTH: 250px; VERTICLE-ALIGN: top">
Source File: c:\inetpub\wwwroot\WroxUnited1\Default.aspx Line: 49
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
The following is the Default.aspx code:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
<%@ Page Language="
vb" AutoEventWireup="false" Codebehind="Default.aspx.
vb" Inherits="WroxUnited1.Wrox.DefaultCodeBehind" %>
<%Inherits="WroxUnited1.WroxUnited.CustomMotdContr ol"%> <-- (Extra to requirements but has no adverse effect)
<%@ Register TagPrefix="WroxUnited" Tagname="Navbar" Src="Navbar.ascx" %>
<%@ Register TagPrefix="WroxUnited" Tagname="Header" Src="Header.ascx" %>
<%@ Register TagPrefix="WroxUnitedMotd" Namespace="WroxUnited" Assembly="CustomMotdControl" %> <-- New line added
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>Wrox United</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<link id="css" href='<%=Session("SelectedCss") %>' type="text/css" rel="stylesheet" >
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<WroxUnited:Header id="HeaderControl" runat="server">
</WroxUnited:Header>
<table style="WIDTH: 800px">
<tr>
<td width="800">
<h2>Welcome to the Wrox United Website!</h2>
</td>
<td width="220">
<asp:Label id="lblRegister" runat="server">Register for email updates</asp:Label>
<asp:TextBox id="txtEmailAddress" runat="server"></asp:TextBox>
<asp:Button id="btnRegister" runat="server" Text="Register" Width="60px"></asp:Button>
<asp:RegularExpressionValidator id="ValidEmail" runat="server" ErrorMessage="Please enter a valid email address"
ControlToValidate="txtEmailAddress" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
</td>
</tr>
</table>
<table style="VERTICAL-ALIGN: top; WIDTH: 800px">
<tr>
<TD style="WIDTH: 177px">
<WroxUnited:Navbar id="NavigationBar" runat="server">
</WroxUnited:Navbar>
</TD>
<TD style="WIDTH: 335px; VERTICLE-ALIGN: top" width="335">
<P>This is the home page for Wrox United Football / Soccer
team!</P>
<P>We hope you will have fun finding out more about the team,
the players and our performance in the league.</P>
<P>The bar on the left will take you to different parts of the
site where you can read about the teams, players and chat
to other fans, or buy exclusive merchandise!</P>
<P>You can view our upcoming matches at-a-glance via the
calendar to the right.</P>
<WroxUnitedMotd:MotdControl id="WuMotd" Name="Matches today" runat="server" /> <-- Error line (not in dropdown menu)
</TD>
<TD style="WIDTH: 250px; VERTICLE-ALIGN: top">
<asp:Calendar id="EventCalendar" runat="server"
OnSelectionChanged="EventCalendar_SelectionChanged "
OnDayRender="EventCalendar_DayRender" CssClass="calendar">
<DayStyle CssClass="normaldate"></DayStyle>
<OtherMonthDayStyle CssClass="othermonthdate">
</OtherMonthDayStyle>
</asp:Calendar>
<P>
<asp:Panel id="pnlFixtureDetails" Visible="False"
Runat="server">
<asp:Repeater id=MatchesByDateList Runat="server">
<HeaderTemplate>
<span style="width:110px;height:25px">Date: </span>
<span style="width:135px;height:25px">
<%# EventCalendar.SelectedDate.ToShortDateString %>
</span>
<br />
</HeaderTemplate>
<ItemTemplate>
<span style="width:110px">Wrox Team</span>
<span style="width:135px">
<%# Container.DataItem("TeamName") %>
</span>
<br />
<span style="width:110px">Opposing Team</span>
<span style="width:135px">
<%# Container.DataItem("OpponentName") %>
</span>
<br />
<span style="width:110px">Venue</span>
<span style="width:135px">
<%# venue(Container.DataItem("OpponentLocation"), _
Container.DataItem("Location")) %>
</span>
<br />
</ItemTemplate>
<SeparatorTemplate>
</span>
</SeparatorTemplate>
</asp:Repeater>
</asp:Panel></P>
<TD>
</tr>
</table>
</form>
</body>
</HTML>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
Wish I could attach an image to this textbox! A picture is worth a thousand words.
Has anyone else experienced this problem?