Copied to clipboard

Flag this post as spam?

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


  • Jason Espin 368 posts 1335 karma points
    Mar 30, 2016 @ 09:37
    Jason Espin
    0

    Redirecting to current Umbraco page with alternate template

    Hi all,

    I'm currently in the process of finalizing a multi-stage booking process and have a query about redirecting away once the process is complete.

    My booking process is built around the product page itself with the form rendered in the view via a HTML.Action statement. Because of this, once the user reaches the end of the booking process, if they press refresh the booking could technically be submitted again.

    To counteract this, I would like to perform a RedirectToCurrentUmbracoPage() but send the user to an alternative template that will render the result of the booking that will be stored in the Viewbag.

    Does anyone know how I can acheive this?

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Apr 01, 2016 @ 16:04
    Alex Skrypnyk
    0

    Hi Jason,

    You can try to redirect to current RawUrl, or CurrentPage.Url and pass alttemplate alias via GET.

    /currentPage?alttemplate=templateForResult
    

    Is it make sense ?

    Cheers

  • Jason Espin 368 posts 1335 karma points
    Apr 04, 2016 @ 13:38
    Jason Espin
    0

    Hi Alex, that makes sense although I want to try and avoid using a query string and have a friendly URL shown to the end user instead. I've also found that my original issue was made worse by the fact I was trying to do the redirect from a child action.

Please Sign in or register to post replies

Write your reply to:

Draft