Using a usercontrol form in an MVC website doesn't post
I've recently upgraded to Umbraco 4.11.5 and I've written a site using MVC however I'd also like to render a macro in an MVC page, for example I have a macro linked to a contact form user control and I've managed to render it in the MVC page but it's not posting, the user control was taken from a working website.
I was wondering if I could get the usercontrol to post successfully or would I have to create the form again in an MVC partial view? I ask because I'd like to keep the functionality that already exists in usercontrols for example I can drag a grid view into a usercontrol using visual studio but I can't for MVC, maybe there is a way around this functionality that I don't know about?
Okay, thanks, I figured as much, in terms of the drag and drop functionality for user controls in visual studio, are there any libraries or extensions available that would provide me with the same end result?
Using a usercontrol form in an MVC website doesn't post
I've recently upgraded to Umbraco 4.11.5 and I've written a site using MVC however I'd also like to render a macro in an MVC page, for example I have a macro linked to a contact form user control and I've managed to render it in the MVC page but it's not posting, the user control was taken from a working website.
I was wondering if I could get the usercontrol to post successfully or would I have to create the form again in an MVC partial view? I ask because I'd like to keep the functionality that already exists in usercontrols for example I can drag a grid view into a usercontrol using visual studio but I can't for MVC, maybe there is a way around this functionality that I don't know about?
Hi Luke
Unfortunately you will not be able to use the usercontrol with postback in an MVC site. You will need to rewrite your control as a SurfaceController.
The following documentation is a walk through on how to create a contact for using a SurfaceController http://our.umbraco.org/Documentation/Reference/Mvc/Forms/turorial-partial-views
Okay, thanks, I figured as much, in terms of the drag and drop functionality for user controls in visual studio, are there any libraries or extensions available that would provide me with the same end result?
is working on a reply...