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
| 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 December 20th, 2009, 07:09 AM
Authorized User
 
Join Date: Dec 2009
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default Chapter 9: Element[user control] is not a known element

Hi,
I am working on try it out on page 294. I did everything as described, but when i drag user control from solution explorer to the ContactForm.aspx page i get a following error.

Code:
<%@ Page Title="Contact Us" Language="C#" MasterPageFile="~/MasterPages/MasterPage.master" AutoEventWireup="true" CodeFile="Contact.aspx.cs" Inherits="Contact" %>

<%@ Register src="../Controls/ContactForm.ascx" tagname="ContactForm" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" Runat="Server">
  <p>
    <uc1:ContactForm ID="ContactForm1" runat="server" />
  </p>
</asp:Content>
error is: Element ContactForm is not a known element.

Can anyone figure this out?

Arya
Reply With Quote
  #2 (permalink)  
Old December 20th, 2009, 07:28 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi Arya,

Are you sure the User Control / the entire site is error free? Try the Build | Rebuild Web Site menu and then look at the Error List window. Do you see anything there?

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
  #3 (permalink)  
Old December 20th, 2009, 07:31 AM
Authorized User
 
Join Date: Dec 2009
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Smile

Hi,
I was a bit hasty, i found the solution to this error.

There was an error in code behind of the ascx page. Class name was slightly different from the Inherits attribute. That correction solved an error.

Arya
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
Chapter 8:User Control Arya BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 December 18th, 2009 04:37 PM
Chapter 7 re hiding root element in TreeView control stephjnca BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 May 27th, 2009 02:26 PM
Problem adding element to the previous element dani1 XSLT 5 September 10th, 2008 01:38 AM
translate element name to element name lexzeus XSLT 3 September 4th, 2006 09:04 AM
adding of element and assigning to one element sushovandatta XSLT 2 November 16th, 2004 07:04 PM



All times are GMT -4. The time now is 02:08 AM.


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