Copied to clipboard

Flag this post as spam?

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


  • Matt Taylor 873 posts 2086 karma points
    Jun 25, 2013 @ 15:07
    Matt Taylor
    0

    RenderTemplate 'DropDownList' must be placed inside a form tag with runat=server

    Within my master template I'm trying to render a template that contains an ASP.Net dropdownlist and I'm getting the following error:

    'DropDownList' must be placed inside a form tag with runat=server

    My master template already contains a runat server form that encloses the templat I'm trying to render so I'm wondering what to do.

    Regards,

    Matt

  • Anthony Southworth 46 posts 173 karma points
    Jun 25, 2013 @ 15:22
    Anthony Southworth
    0

    I think this is the same issue I had here: http://our.umbraco.org/projects/backoffice-extensions/ucomponents/questionssuggestions/29948-Widget-using-RenderTemplate-does-not-display-TextBox-in-a-User-Control

    You need to use this other macro to render the form.

    Thanks
    Tony

     

  • Matt Taylor 873 posts 2086 karma points
    Jun 25, 2013 @ 17:33
    Matt Taylor
    0

    Hi Tony,

    Thanks for that information.
    I've taken a look and unfortunately I don't think I'm going to be able to use the same technique.
    Each of my widgets are quite compliacated with numerous fields.

    Regards, Matt

  • Anthony Southworth 46 posts 173 karma points
    Jun 25, 2013 @ 18:05
    Anthony Southworth
    0

    Hi Matt,

    I'm not sure why the number of fields makes a difference, it was the number of forms on the page that was the issue for me.
    If you've just got one form you can put form tags in the widget.

    If you find a solution using RenderTemplate please post it because I would rather use it than the other macro.

    Thanks
    Tony

  • Matt Taylor 873 posts 2086 karma points
    Jun 25, 2013 @ 22:00
    Matt Taylor
    0

    Maybe I mis-understood the solution but it seemed to involve rendering macros though a Rich Text Box.

    My scenario is a littl more complex, I need to render tiles on a page.

    Page 1
    -Tiles Type A
    - Tile type 1
    - Tile type 2
    - Tile type 1
    - Tile type 3

    Page 2
    -Tiles Type B
    - Tile type 7
    - Tile type 6
    - Tile type 1
    - Tile type 3

    Each Tile is a document type with a bunch of fields. Only certain types of tile are allowed under certain types of page, restricted by document type.

    I can't see how the mentioned solution would be applied.

    Cheers, Matt

  • Anthony Southworth 46 posts 173 karma points
    Jun 26, 2013 @ 12:32
    Anthony Southworth
    0

    The Sidebar Widgets macro just lets you have multiple widget forms on one page which RenderTemplate doesn't allow.

    This will solve your initial question. It's the same issue that I had.

    You can then customise this code to get restrictions on the different widgets and pages.

    Thanks
    Tony 

  • Matt Taylor 873 posts 2086 karma points
    Jun 27, 2013 @ 14:19
    Matt Taylor
    0

    Hi Tony,

    Thanks but I can't see it working for my project which is too complex to explain.

    To work around the limitation I've implemented the functionality I needed using HTML controls rather than asp.net controls as they don't need to be in a runat="server" form.

    Regards, Matt

Please Sign in or register to post replies

Write your reply to:

Draft