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 ?
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.
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 triedModel.Content.Url
but it contains localization prefix:/en/deposit/
. I need to get only/deposit/
. Any ideas ?Hi Saba,
This might help: https://stackoverflow.com/questions/14685147/how-can-i-parse-http-urls-in-c
-Craig
Have you tried this method?
For instance, the relative part is
/some/page
of an absolute URLhttps://www.example.com/some/page
, which you can get by setting the mode toUrlMode.Absolute
.Find more info in the documentation.
is working on a reply...