I need to get the base path because currently my application is hosted as a sub-site like:
www.example.com/site1/site2/
Where my IIS application is setup in site2, but my razor pages and master page is referencing things like:
<link href="/Assets/css/styles.css" rel="stylesheet">
When in this case it should be like:
<link href="/site1/site2/Assets/css/styles.css" rel="stylesheet">
I also have images like:
<img src="/Assets/images/logo.jpg" />
How can I get this to work in a dynamic way so I don't have to hard code the sub-directory somewhere?