Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Fredrik 89 posts 108 karma points
    Oct 05, 2010 @ 14:33
    Fredrik
    0

    User Control Error "must be placed inside a form tag with runat=server."

    Hi,

    Im new to Umbraco and there are probably other threads about this error but I have not yet found anything that helps my situation.

    So please, what seems to be my problem here?

    [CODE]

    <%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>


    <asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"[]>
    <html xmlns="http://www.w3.org/1999/xhtml">
     <head id="head" runat="server">
      <title><umbraco:Item field="pagetitle" runat="server"></umbraco:Item></title>
      
    </head>
     <body> 
      
      <umbraco:Macro Alias="UserControlTest" runat="server"></umbraco:Macro>


     </body>
    </html>
    </asp:Content>

    [/CODE]

  • Fredrik 89 posts 108 karma points
    Oct 05, 2010 @ 14:37
    Fredrik
    0

    Look at this instead:

    <%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>


    <asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"[]>
    <html xmlns="http://www.w3.org/1999/xhtml">
     <head id="head" runat="server">
      <title><umbraco:Item field="pagetitle" runat="server"></umbraco:Item></title>
      
    </head>
     <body> 
      
      <umbraco:Macro Alias="UserControlTest" runat="server"></umbraco:Macro>
      

     </body>
    </html>
    </asp:Content>

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Oct 05, 2010 @ 14:41
    Dirk De Grave
    0

    Must have

    <body>
    <form runat="server">
    ...
    <umbraco:Macro Alias="UserControlTest" runat="server"></umbraco:Macro>
    ...
    <form>
    </body>

     

    Hope this helps.

    Regards,

    /Dirk

     

  • Biagio Paruolo 1621 posts 1914 karma points c-trib
    Oct 05, 2010 @ 14:58
    Biagio Paruolo
    0

    MVC on the road..

  • Fredrik 89 posts 108 karma points
    Oct 05, 2010 @ 16:11
    Fredrik
    0

    It worked, thanks!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies