Any input as to why this HttpPost is not firing? There is a postback taking place when send is pressed buyt the when putting a break point in the HttpPost it's never fired.
Here's a snippet of my code. I had to put spaces in the input tag for it not to render the actual button.
@inherits UmbracoViewPage @{ Layout = "Layout.cshtml"; } @using (Html.BeginForm()) { @Html.AntiForgeryToken() @Html.TextAreaFor(m => m.Message) < i n p u t type="submit" value="Send" />
What kind of controller are you using? In Umbraco a HttpPost to a controller only works with a SurfaceController by default. You can also use a SurfaceController for route hijacking and post back to that like I did in the Hybrid Framework.
Thanks for your reply! I had it inherit from RenderMvcModel so I see the mistake. However, it seemed like a bit too much work so I just renamed the actions to the same name as the template. All good! :)
Hijacked route post action not firing
Hi,
Any input as to why this HttpPost is not firing? There is a postback taking place when send is pressed buyt the when putting a break point in the HttpPost it's never fired.
Here's a snippet of my code. I had to put spaces in the input tag for it not to render the actual button.
Hello,
What kind of controller are you using? In Umbraco a HttpPost to a controller only works with a SurfaceController by default. You can also use a SurfaceController for route hijacking and post back to that like I did in the Hybrid Framework.
Jeroen
This documentation might also help: http://our.umbraco.org/documentation/reference/Templating/Mvc/forms
Jeroen
Thanks for your reply! I had it inherit from RenderMvcModel so I see the mistake. However, it seemed like a bit too much work so I just renamed the actions to the same name as the template. All good! :)
is working on a reply...