what is the best practices around links and url in asp.net-mvc

Posted by ooo on Stack Overflow See other posts from Stack Overflow or by ooo
Published on 2010-05-26T11:20:00Z Indexed on 2010/05/26 11:21 UTC
Read the original article Hit count: 192

Filed under:
|

looking at different sites, i see conflicting conventions.

if you want to have links to images, other pages, js files, i have seen:

URL.Content("~/scripts/myscript.js");
<a href="/scripts/msscripts.js">
<img src="../../content/stylesheet.css">
<img src="../content/stylesheet.css">

these all seem to work in asp.net mvc but it seems like there are all doing slightly different things.

I am moving to a new webserver where they are changing from iis redirecting to isapi rewriting and i was told to make sure my links were done in a correct way or the site not work.

Can someone clarify what the "correct" way is ?

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about links