[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1268
  • Last Modified:

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

0
kuntilanak
Asked:
kuntilanak
  • 2
  • 2
  • 2
2 Solutions
 
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
 
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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
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

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now