Copied to clipboard

Flag this post as spam?

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


  • Sourav 8 posts 88 karma points
    Jan 15, 2018 @ 07:00
    Sourav
    0

    Navigating from One page to other

    Hi,

    I am trying to navigate in Umbraco from One page to other and i am able to do it.

    My only problem is that it doesnt update the Link.

    Suppose i am navigating from ~/Home to ~/History page and it does Shows the History page details however the URL still remains to ~/Home page

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Jan 15, 2018 @ 09:02
    Alex Skrypnyk
    0

    hi Sourav

    How did you do the navigation?

    /Alex

  • Sourav 8 posts 88 karma points
    Jan 15, 2018 @ 09:09
    Sourav
    0

    For navigating i am using a Submit button which performs certain task and then from controller itself i pass

    RedirectToAction("Index", "History"); I even tried but doesnt work

    return View("History");

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Jan 15, 2018 @ 09:21
    Alex Skrypnyk
    0

    Sourav, why are you using submit for navigation?

    you can use just link:

    <a href="/History"></a>
    
  • Sourav 8 posts 88 karma points
    Jan 15, 2018 @ 09:28
    Sourav
    0

    Sorry If i was not clear.

    Its login Page. User has to enter User Id and Password (Its connecting to MS CRM) and then click on Submit button. Now once i submit i check if user ID and password are valid. If yes then i have to navigate to history or Home page.

    Regards, Sourav

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Jan 15, 2018 @ 10:16
    Alex Skrypnyk
    100

    Try to use:

    return Redirect("/History");
    
  • Sourav 8 posts 88 karma points
    Jan 15, 2018 @ 14:21
    Sourav
    0

    It worked. Great!

    Thanks

  • Leonardo Moura 21 posts 90 karma points
    Jan 15, 2018 @ 15:23
    Leonardo Moura
    0

    Hi Sourav,

    You can do it in different ways:

    With HTML

    1) <a href="/History">History</a>
    

    With Javascript

    2) window.history.back() or window.history.go(-1)
    

    With jQuery

    3)  $(location).attr('href','http://www.example.com')
    $(window).attr('location','http://www.example.com')
    $(location).prop('href', 'http://www.example.com')
    

    With Response Redirect

    4) Response.Redirect(Url.Action("History", new { id = Model.ID }));
    
Please Sign in or register to post replies

Write your reply to:

Draft