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?
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.
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?
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
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
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
Does the Web API require the use of MVC?
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
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 !
is working on a reply...