...我有以下幾點:Javascript文件在ASP.NET MVC中沒有正確映射?
<script src="Scripts/jquery-1.2.6.min.js" type="text/javascript"></script>
<script src="Scripts/Plugins/jquery-corners.js" type="text/javascript"></script>
這工作......直到我開始深入到路線...例如,http://localhost/mywebsite
工程,但http://localhost/mywebsite/action
不起作用 - 我失去了所有的JavaScript導入。
我對我的圖像使用Url.Content ...但它看起來不像我可以爲我的JavaScript做任何事情。這不是那麼困難......我必須錯過一些東西!任何幫助,將不勝感激!
更新
我發現下面的Using scripts in a master page with ASP.NET MVC ......但我不能得到這個工作,如果我把它的標籤......在我需要它之間。如果我不嘗試把它那裏,我得到以下錯誤:
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
看起來像我的建議。 – jdigital 2009-03-04 03:41:13