No route error when using SurfaceController in Umbraco 7.1.8
Hi there,
I am trying to figure out how to get a SurfaceController working as in these screencasts on Umbraco.tv: Surface Controllers. The problem is that when I try to navigate to the Contact Us page, I get a "No route in the route table matches the supplied values." error.
My surface controller:
namespace UmbracoSurface2.Controllers { public class ContactFormSurfaceController : SurfaceController { public ActionResult Index() { return PartialView("ContactForm", new ContactFormViewModel()); } } }
The one big difference between mine and the screencasts is that I'm using Visual Studio 2013 so the ASP.NET Website template has a newer version of MVC which I had to remove to get the UmbracoCms NuGet package to install. I also tried it without adding MVC to the project at the beginning.
No route error when using SurfaceController in Umbraco 7.1.8
Hi there,
I am trying to figure out how to get a SurfaceController working as in these screencasts on Umbraco.tv: Surface Controllers. The problem is that when I try to navigate to the Contact Us page, I get a "No route in the route table matches the supplied values." error.
My surface controller:
My ContactForm partial:
and my template:
The one big difference between mine and the screencasts is that I'm using Visual Studio 2013 so the ASP.NET Website template has a newer version of MVC which I had to remove to get the UmbracoCms NuGet package to install. I also tried it without adding MVC to the project at the beginning.
Any help/suggestions would be appreciated,
Jason
Hi Jason,
I might be wrong but shouldn't your template reference the controller like the below instead of 'ContactFormController'?
Thanks, Dan.
Wow, I can't believe I missed that. You're exactly right Dan! I must have been tired yesterday.
Thanks,
Jason
is working on a reply...