I have the following image that displays in this way.
<img src="../../../..@Model.FloorPlan.Floor_Plan_Image_Path@Model.FloorPlan.Floor_Plan_Image_Filename" alt=""/>
I want, if possible, the src attribute will be changed to Url.Content.
I tried this, but my problem is that it treats my model as a string:
<img src="@Url.Content("~/Model.FloorPlan.Floor_Plan_Image_Path@Model.FloorPlan.Floor_Plan_Image_Filename")" alt=""/>
Can anybody help me?
The value of the path and file name is as follows:
Model.FloorPlan.Floor_Plan_Image_Path = "/ Content / Uploads / FloorPlans / 00004601 /" Model.FloorPlan.Floor_Plan_Image_Filename = "testfloorplan.png"
c # asp.net-mvc asp.net-mvc-3 razor
Jobert Enamno Apr 18 '13 at 9:29 am 2013-04-18 09:29
source share