Copied to clipboard

Flag this post as spam?

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

  • J 419 posts 785 karma points
    1 week ago

    Correct way to redirect to another page with id?

    I have a TestFormController inheriting from SurfaceController.

    I render the form in a template (which has a doc type too) as

    Html.RenderAction("RenderForm", "TestFormSurface"); 

    This returns a partial View and the form is displayed.

    The current view can be considered as a List of products. Therefore i am looping through the products in the HTML of this partial.

    Part of this HTML i would like this to click the product to take it to its own page.

    I am about to create a new template (maybe doc type) for a single product so when the user clicks this product in the list it redirects to a new page along with the ID so i can look up the product from my database.

    I thought about using @Html.ActionLink but the URL isnt matching.

    I then became a little confused when reading about Route Hijacking and wondering if i need to do this in another simpler way?

Please Sign in or register to post replies

Write your reply to: