Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 6th, 2009, 02:29 PM
Authorized User
Points: 297, Level: 5
Points: 297, Level: 5 Points: 297, Level: 5 Points: 297, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Reply With Quote
  #2 (permalink)  
Old August 6th, 2009, 02:48 PM
Imar's Avatar
Wrox Author
Points: 72,045, Level: 100
Points: 72,045, Level: 100 Points: 72,045, Level: 100 Points: 72,045, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,083
Thanks: 80
Thanked 1,587 Times in 1,563 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!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 04:33 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.