Copied to clipboard

Flag this post as spam?

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


  • Saba Tandashvili 29 posts 181 karma points
    Dec 14, 2018 @ 14:39
    Saba Tandashvili
    0

    How can i get current page url without domain name

    Hi, I am standing on page http://localhost:52664/en/deposit/ How can i get current page url without domain name ? i tried Model.Content.Url but it contains localization prefix: /en/deposit/. I need to get only /deposit/. Any ideas ?

  • Craig100 1136 posts 2523 karma points c-trib
    Dec 14, 2018 @ 15:17
  • Jakob Bagterp 13 posts 115 karma points c-trib
    May 18, 2023 @ 16:15
    Jakob Bagterp
    0

    Have you tried this method?

    Model.Url(mode: UrlMode.Relative)
    

    For instance, the relative part is /some/page of an absolute URL https://www.example.com/some/page, which you can get by setting the mode to UrlMode.Absolute.

    Find more info in the documentation.

  • 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