I am looking to retrieve the relative part of the current Blazor page URL.
For example if I am currently on https://www.mywebsite.com/someoverview, I wish to retrieve /someoverview.
I am looking to retrieve the relative part of the current Blazor page URL.
For example if I am currently on https://www.mywebsite.com/someoverview, I wish to retrieve /someoverview.
Copyright © 2021 Jogjafile Inc.
It's not Blazor specific, we have the Uri class:
or for the current Blazor page:
but do note that ToBaseRelativePath() does not include a leading
/
, it is different from LocalPath. You can mix & match.