Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 6th, 2009, 02:29 PM
Authorized User
 
Join Date: Apr 2009
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chap 16 pg 574: Elements not supported Elements not known

Hello All,

I have done the code on pg 574 and I get a series of errors under HTML elements
The first Repeater is underlined and when I mouseover it says
"Element Repeater is not a known element. This can occur if there is a compilation error or the web.config is missing.

The first ItemTemplate is underlined and mouseover generates the following error
Validation (XHTML 1.0 Transitional Element "ItemTemplate is not supported"

Hyperlink is also coming up as "not a known element"
as too is PlaceHolder

My Default.aspx code looks like this
Code:
<%@ Page Language="C#" MasterPageFile="~/MasterPages/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="Welcome to Planet Wrox" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" Runat="Server">
<asp:Repeater ID="Repeater1" runat="server">
<HeaderTemplate>
<p>Below you find a list with Reviews for your favourite music genres.</p>
</HeaderTemplate>
<ItemTemplate>
<h3><asp:Literal ID="Literal1" runat="server"
Text='<%# Eval("Name") %>'></asp:Literal></h3>
<asp:Repeater ID="Repeater2" runat="server" DataSource='<%# Eval("Reviews")%>'>
<ItemTemplate>
<asp:HyperLink ID="HyperLink1" runat="server" Text='<%# Eval("Title") %>'
NavigateUrl='<%# "ViewDetails.aspx?ReviewId=" + Eval("Id").ToString() %>'>
</asp:HyperLink><br />
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>
<asp:PlaceHolder ID="plcNoRecords" runat="server" Visible="false">
<p>Sorry no Reviews were found. You either didn't set your favourite genres or you may need to log in first.</p>
</asp:PlaceHolder>
<p>You can change your genre preferences <a href="~/MyProfile.aspx" runat="server">here</a></p>
</asp:Content>
<h1>Hi there visitor and welcome to Planet Wrox</h1>
<p class="Introduction">
We're glad you are paying a visit to <a href="http://www.PlanetWrox.com">
www.PlanetWrox.com</a>, the coolest music community site on the Internet.
</p>
<p class="Introduction">
Feel free to have a <a href="Default.aspx">look around</a>; as there are lots of 
interesting <b>reviews and concert pictures</b> to be found here.
</p>
<p>
You can <a href="Login.aspx">log in</a> here
</p>
</asp:Content>
Heeelllp.

Cheers

Thomas
 
Old August 6th, 2009, 02:48 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Thomas,
Your first </asp:Content> has gone travelling. Take a look at this:

Code:
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" Runat="Server">
Notice how Content1 is missing its closing tag. I wonder where it's gone?

Look down a bit and you find this:

Code:
<p>You can change your genre preferences <a href="~/MyProfile.aspx" runat="server">here</a></p>
</asp:Content> <!-- See this?? -->
<h1>Hi there visitor and welcome to Planet Wrox</h1>
Oh, there it is. Cut it from this location, and paste it after the first opening Content tag and you're good to go...

Hope this helps.

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chap 16 pg 570 System.Collections.Generic has some invalid arguments tomche BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 7 August 6th, 2009 10:08 AM
Chap 16 pg 562 MyProfile does see web.config tomche BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 7 July 28th, 2009 10:47 AM
Pg 16 Green Arrow? Astrocloud BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 5 March 17th, 2008 09:34 AM
Chap 16 example not working John Cook BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 2 February 10th, 2006 05:40 PM
chapter 16 pg 570 andrewajp002 BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 3 February 5th, 2006 07:16 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.