Copied to clipboard

Flag this post as spam?

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


  • Saied 349 posts 674 karma points
    May 10, 2016 @ 05:07
    Saied
    0

    Hide controller name on virtual routes?

    Hi,

    I have a virtual node name product and I also have a controller named ProductController that has an action method called GetProduct. GetProduct takes a parameter called id which is the id of the product to get from the database. My route is configured as product/{id}, so when I click to see a specific product, I get something like this in the url:

    http://localhost/product/abc

    Is there a way to have the url be http://localhost/abc.

    I tried removing product from my route configuration, but then if I go to any page such as http://localhost/blog or http://localhost/support, it thinks those those pages are product pages and tries to hit the product controller.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies