路徑圖像位於:/Content/panoramic/panoramas/UCCParc.tifMVC3你如何指定圖像
我訪問圖像,如:
<img src="@Url.Content("~/Content/panoramic/panoramas/" + @imgName + "")"/>
但是,當我嘗試加載頁面localhost/pano,其中pano是控制器,圖像未找到。這是在MVC3中訪問文件的正確方法嗎?將文件夾hierarchi指定爲圖像的路徑是正確的,還是應該以某種方式將控制器包裹在路徑中?
Url.Content()生成的路徑是什麼? – egoodberry
/Content/panoramic/panoramas/img1.jpg – Ryan