When running my web application on my local computer, I can specify css / scripts / images using:
<link href="/Content/Site.css" rel="stylesheet" type="text/css" />
But when I turned around on my development server, he could not find any of my content. After studying the question, everyone suggests using the method below:
<link href="<%=Url.Content("~/Content/Site.css")%>" rel="stylesheet" type="text/css" />
<img src="<%=Url.Content("~/Content/3.png")%>" />
At least now all my content is uploaded and working when I click on the development server. However, now that I have a script server, the Design view in Visual Studio does not load any / etc style. I am wondering if there is an alternative or something I am missing, maybe fix it? Or maybe I will fix everything? Any input is welcome.
source
share