I'm new to umbraco. After following multiple tutorials on custom routing I realized that once I can custom route, my application can't route between my custom routes and umbraco routing. My application needs to submit data to custom tables using custom routing but also be able to navigate back to umbraco nodes.
Can anyone help me setup custom routing that can also move to umbraco routing?
don't quite get what you want to achieve.
You can register custom routes in umbraco to match routes to specific nodes in the trees. But of course you can still link between your pages.
I have a single database that has both Umbraco and custom tables. My application needs to register and search members in a custom table.
To achieve this I understand that I have to use an ORM such as Petapoco. I have a search form in my home page that receives a search
criteria. The post action in my Home controller then redirects to another controller (Search controller) that will process the search
query and return the results in a view different (Search view) to the home view (where my original search form is). The below error is
returned when the Search controller tries to render the Search view. Both controllers inherit from the SurfaceController. I have been
researching how to implement this problem for weeks and I still don't know how to resolve it.
System.InvalidOperationException
HResult=0x80131509
Message=Cannot find the Umbraco route definition in the route values, the request must be made in the context of an Umbraco request
Source=umbraco
StackTrace:
at Umbraco.Web.Mvc.SurfaceController.get_CurrentPage()
at WebApplication1.Controllers.SiteSharedLayoutController.GetNavigationModel() in C:\inetpub\wwwroot\professionalsconnect\WebApplication1\WebApplication1\Controllers\SiteSharedLayoutController.cs:line 40
at WebApplication1.Controllers.SiteSharedLayoutController.RenderHeader() in C:\inetpub\wwwroot\professionalsconnect\WebApplication1\WebApplication1\Controllers\SiteSharedLayoutController.cs:line 32
at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.
so you don't actually have a search node in your tree? As the easiest way would be to habe a search node, create a rendermvccontroller for it and post to that with your form.
At least that is how I do search implementation usually.
Move between custom routing and umbraco routing
Hi Everyone,
I'm new to umbraco. After following multiple tutorials on custom routing I realized that once I can custom route, my application can't route between my custom routes and umbraco routing. My application needs to submit data to custom tables using custom routing but also be able to navigate back to umbraco nodes.
Can anyone help me setup custom routing that can also move to umbraco routing?
Hi Neo,
don't quite get what you want to achieve. You can register custom routes in umbraco to match routes to specific nodes in the trees. But of course you can still link between your pages.
Regards David
Hi David,
I have a single database that has both Umbraco and custom tables. My application needs to register and search members in a custom table. To achieve this I understand that I have to use an ORM such as Petapoco. I have a search form in my home page that receives a search criteria. The post action in my Home controller then redirects to another controller (Search controller) that will process the search query and return the results in a view different (Search view) to the home view (where my original search form is). The below error is returned when the Search controller tries to render the Search view. Both controllers inherit from the SurfaceController. I have been researching how to implement this problem for weeks and I still don't know how to resolve it.
System.InvalidOperationException HResult=0x80131509 Message=Cannot find the Umbraco route definition in the route values, the request must be made in the context of an Umbraco request Source=umbraco StackTrace: at Umbraco.Web.Mvc.SurfaceController.get_CurrentPage() at WebApplication1.Controllers.SiteSharedLayoutController.GetNavigationModel() in C:\inetpub\wwwroot\professionalsconnect\WebApplication1\WebApplication1\Controllers\SiteSharedLayoutController.cs:line 40 at WebApplication1.Controllers.SiteSharedLayoutController.RenderHeader() in C:\inetpub\wwwroot\professionalsconnect\WebApplication1\WebApplication1\Controllers\SiteSharedLayoutController.cs:line 32 at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary
2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary
2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.Hi,
so you don't actually have a search node in your tree? As the easiest way would be to habe a search node, create a rendermvccontroller for it and post to that with your form. At least that is how I do search implementation usually.
Hi,
I do have a search node in my tree. Can you show me how you implemented your search from custom tables
is working on a reply...