Issue with PartialView in Surface Controller going to /umbraco/surface/
Hi,
I have a Surface Controller that posts to an API from an Ajax.BeginForm.
The Post successfully goes to the Surface controller and posts to the API but when I want to return to a Thank you page it takes me to a XXXX/umbraco/surface/XXX url and the page is white - it is the correct cshtml page as the result is shown - it is just the wrong URL and the Partial page is not inside the parent page.
in your onsuccess function you need to set the html of some element to the data (partial view) that is returned by the form.
Ajax forms return to the form, so you should either set an updatetargetid where the form will display it's reult or process the returned data in the onsuccess.
Issue with PartialView in Surface Controller going to /umbraco/surface/
Hi,
I have a Surface Controller that posts to an API from an Ajax.BeginForm.
The Post successfully goes to the Surface controller and posts to the API but when I want to return to a Thank you page it takes me to a XXXX/umbraco/surface/XXX url and the page is white - it is the correct cshtml page as the result is shown - it is just the wrong URL and the Partial page is not inside the parent page.
I'm using the following:
I have tried with and without [HTTPPOST]
I call the form from the parent page like:
Which inherits the following:
Any ideas?
Thanks
Jon
And my Ajax.BeginForm looks like:
What does your onsuccess function do? Since you are using Ajax, your onsuccess function should render the view that was returned
Hi, it just hides and shows the form I can't seem to return back to the form page from the controller. Can I return a different method?
in your onsuccess function you need to set the html of some element to the data (partial view) that is returned by the form.
Ajax forms return to the form, so you should either set an updatetargetid where the form will display it's reult or process the returned data in the onsuccess.
is working on a reply...