Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Neo Paul 3 posts 73 karma points
    Aug 18, 2018 @ 13:03
    Neo Paul
    0

    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?

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Aug 20, 2018 @ 20:08
    David Brendel
    0

    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

  • Neo Paul 3 posts 73 karma points
    Aug 21, 2018 @ 13:05
    Neo Paul
    0

    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, IDictionary2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Aug 21, 2018 @ 14:19
    David Brendel
    0

    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.

  • Neo Paul 3 posts 73 karma points
    Aug 22, 2018 @ 05:59
    Neo Paul
    0

    Hi,

    I do have a search node in my tree. Can you show me how you implemented your search from custom tables

Please Sign in or register to post replies

Write your reply to:

Draft