Copied to clipboard

Flag this post as spam?

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


  • North Krimsly 59 posts 80 karma points
    Sep 18, 2010 @ 05:20
    North Krimsly
    0

    Where to place scriptManager

    Greetings all,

    I need to insert an asp:ScriptManager into my template.  I'm thinking the place to do this is in the master template.  However, when I place the ScriptManager into the master template, I get a fatal runtime error:

    "Control 'ContentPlaceHolderDefault_ContactFormScriptManager' of type 'ScriptManager' must be placed inside a form tag with runat=server."

    It makes sense that the ScriptManager must be placed into a form tag.  However I'm not sure how the form tag gets rendered by Umbraco, so I'm not sure where I should place the ScriptManager.  I'd appreciate your suggestions on this.

    Thanks a lot,

    -NorthK


  • Rich Green 2246 posts 4008 karma points
    Sep 18, 2010 @ 09:35
    Rich Green
    1

    You just need to add the following form tag somewhere above your scriptManager tag

    <form runat="server" id="someForm">
      Your script tag anywhere here, probably on the next line
    
    
    
    </form> 

    If you need the script tag on every page then I would put this in your master template.

    Best of luck

    Rich 

  • North Krimsly 59 posts 80 karma points
    Sep 18, 2010 @ 19:46
    North Krimsly
    0

    Oh, Duh...I mistakenly assumed that Umbraco would render a form tag by itself, and that I had to try to fit in my ScriptManager tag in the right spot so it would be inside the rendered form tag...made this a lot more complicated than it is!

    Thanks a lot Rich!

    -NorthK

     

  • 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