Copied to clipboard

Flag this post as spam?

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


  • AvihayBit 149 posts 303 karma points
    Dec 29, 2012 @ 21:40
    AvihayBit
    0

    wierd "Error in '/' Application" using Doc Cart

    Hey all,

    I developed a books selling website - www.hamadaf-y.co.il and I'm trying to use the Doc Cart package following this tutorial- http://blog.darren-ferguson.com/2011/5/9/a-simple-umbraco-cart-with-doc-cart,-contour-and-bill4u but every time I'm trying to add the AddToCart btn I'm getting this annoying msg:

    Control 'ContentPlaceHolderDefault_content_inner_content_AddToCart_3_ctl00' of type 'ImageButton' must be placed inside a form tag with runat=server.

    any Ideas how i solve this?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Dec 29, 2012 @ 21:58
    Jan Skovgaard
    100

    Hi AvihayBit

    Do you have a server side form sorrounding your content in your master template?

    if not you should probably place one between <body> and </body> like...

    <body>

    <form runat="server">
    <!-- Rest of your content goes here -->
    </form>

    </body>

    Hope this helps.

    /Jan

  • AvihayBit 149 posts 303 karma points
    Dec 30, 2012 @ 13:19
    AvihayBit
    0

    Hi jan

    it worked! thanks a lot!

    Why this form tag is needed only when I put this macro? all the other macros didn't make anny error...

    what is the purpose of this <form runat="server">? didn't met it till now :)

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Dec 30, 2012 @ 15:32
    Jan Skovgaard
    0

    Hi AvihayBit

    I'm very glad to hear that :)

    it's because that is the way that .net works. Since this macro is based on a user control that holds a .net form it needs to have the asp.net serverside form wrapped around it. You can read more about asp.net webforms here: http://msdn.microsoft.com/en-us/library/ms973868.aspx

    Have a happy new year :)

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft