Copied to clipboard

Flag this post as spam?

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


  • Gordon Saxby 1461 posts 1883 karma points
    Dec 17, 2013 @ 17:26
    Gordon Saxby
    0

    Submit form to /Base

    I have a signup form, which has around 10 fields - some text (name, email, etc) and some dropdowns.

    I would like to use Ajax and /Base to process the submitted form, however it does not appear to be possible to pass / process the entire form as a POST rather than a GET. There is potential for the URL to become too long.

    Is it possible to pass the form data as a POST to a /Base function, or does it have to be a querystring?

    Is there an alternative method?

  • Andy Butland 422 posts 2334 karma points MVP 4x hq c-trib
    Dec 17, 2013 @ 17:32
    Andy Butland
    0

    I've not used base in a while, but as far as I know you have access to Request.Form, so you should be able to post to the method.

    Andy

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Dec 17, 2013 @ 17:34
    Jeroen Breuer
    0

    It's been a while since I've used /base. These days it's better to use the new Web API which definitely supports POST. If you want to know how /base works it might be a good idea to have a look in the Umbraco source code. Than you can find out if POST is supported.

    Jeroen

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Dec 17, 2013 @ 17:37
    Jeroen Breuer
    0

    Here it also says /base eventually will become obsolete and Web API is a better alternative: https://groups.google.com/forum/#!topic/umbraco-dev/grC4UX9iwmc

    Jeroen

  • Gordon Saxby 1461 posts 1883 karma points
    Dec 18, 2013 @ 10:16
    Gordon Saxby
    0

    Does the Web API require the use of MVC?

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Dec 18, 2013 @ 10:19
    Jeroen Breuer
    0

    I don't think that the Web API requires MVC. This might help: http://stackoverflow.com/questions/10306620/how-to-use-webapi-without-asp-net-mvc

    Jeroen

  • Gordon Saxby 1461 posts 1883 karma points
    Dec 18, 2013 @ 10:56
    Gordon Saxby
    0

    Umm, it doesn't seem that straightforward to implement in Umbraco V6.1 ... maybe I'll stick with /Base for this project.

    Looks like I really ought to get up to speed with MVC !

Please Sign in or register to post replies

Write your reply to:

Draft