Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
hi, i have a clean test Umbraco 8 website.
i am trying to create page and SurfaceController but nothing happened.
in other site (umbraco 7) it usualy work.
public class TestRedirectController : SurfaceController
// GET: TestRedirect
public ActionResult Index()
Layout = "master.cshtml";
Layout = null;
The first thing that stands out is you are calling a Post method via Http.Action which I don't believe is possible. Try taking the [HttpPost] attribute off of your action on your controller and see if that works.
still not working
What is the exact error you are getting?
just 404, it doesn't even enter the controller.
when i use the full link it workes:
but it doesn't work with template.
Ok, so it looks like this isn't a problem with your surface controller now, I'd say it's an issue with your source url.
Because of how you've got things set up, it appears to me that you are trying to go to an existing page in the site, then when it comes to render the view for that page, hit your surface controller.
That error tells me that either the page you are trying to go to initially doesn't exist or it has no template set against it.
Things to check:
hi Nik, i wanted to thank you for you help.
this is what i usualy do...
That's fine from a template point of view, but you need a doc type and a page to exist in your content tree. It's not possible to route "just" to a view which I think is what you are currently trying to do.
What is your overall objective with this controller/Action?
i'm doing some testing with umbraco forms.
i just wanted to test receiving FormID after form has submited to another controller.
i got it to work, i needed the docType and create a page.
thank you very much for your help.
No worries :-) Happy it's working for you.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted