Element 'register' is not supported

I am getting the error above in my .aspx page. This page is inherited from the Master page and the register is put inside the content place holder. What am I doing wrong here?
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <%@ Register TagPrefix="Club" Namespace="ClubSite" %>
    <%@ Register TagPrefix="ec" Namespace="ControlSample" Assembly="EventCalendar" %>
</asp:Content>

/*here's where I put it inside my master page*/

<head id="Head1" runat="server">
    <title>Permias Tucson</title>
     <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
     <link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />
</head>

Open in new window

kuntilanakAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

santanu30inCommented:
Hi
If you add  "Register" tag top  of the "Content " tag in the .aspx page then ur site working fine and you solve your problem
Like this below:-

    <%@ Register TagPrefix="Club" Namespace="ClubSite" %>
    <%@ Register TagPrefix="ec" Namespace="ControlSample" Assembly="EventCalendar" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
 
 
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pschramaCommented:
Just place those directives at the top of the page and it should work.
0
santanu30inCommented:

Also if you add the user control by drag & Drop directly to the Design view of this .aspx page then all code are generate automatically.
 
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

kuntilanakAuthor Commented:
may I know why putting it inside the content place holder doesn't work?
0
pschramaCommented:
According to http://msdn.microsoft.com/en-us/library/xz702w3e.aspx: When used, directives can be located anywhere in an .aspx or .ascx file, though standard practice is to include them at the beginning of the file. Each directive can contain one or more attributes (paired with values) that are specific to that directive.

I assume the limitation is that you cannot put them inside other controls.
0
kuntilanakAuthor Commented:
okay... I must have missed the part where I can't put it in other control
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.