I have an image that I want to use it’s src attribute in relative format
when my website URL was http://localhost/ I used to use this code to access this image file:
<img alt="something" src="/Files/pic.png">
But now I have to add an application to my site and change my site URL to http://localhost/mysite.
Now none of my images load in this site because the path is still http://localhost/Files/pic.png not http://localhost/mysite/Files/pic.png
how can I change my root URL (/) to http://localhost/mysite/?
Thanks
Use tilde
~in a server control to use a relative path.