0

I have created a mvc3 application which work fine locally. I work for a department where all websites sits under single url. when i deployed my website to test environment than page are coming up but all java script and content (images,css) folder path is not right.

I work for a department where all websites sits under single url eg https://abcd.test.hosts.network/application1 ,https://abcd.test.hosts.network/application2

When i check location of images it shows following path http://abcd.test.hosts.network/Content/Images/Master/masterBannerLeft5.jpg

What should i do or how i should deploy my application to fix the problem of java script and content folder.

4

1 回答 1

1

您是否使用以下内容来引用内容文件:

<link href="@Url.Content("~/content/css/normalize.css")" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="@Url.Content("~/content/js/jquery.js")"></script>

而不是:

<link href="/content/css/normalize.css" rel="stylesheet" type="text/css" />

有关详细信息,请参阅http://msdn.microsoft.com/en-us/library/system.web.mvc.urlhelper.content.aspx,它基本上解决了您的应用程序中的路径。

于 2012-08-16T08:24:29.450 回答