View Single Post
  #1 (permalink)  
Old August 6th, 2009, 02:29 PM
tomche tomche is offline
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