Displaying an uploaded image in MVC 3 Razor

后端 未结 1 366
轻奢々
轻奢々 2020-12-29 13:43

Well, this newbie is doing something wrong when displaying images uploaded to the server:

model:

public class Person
{
    public int ID { get; set;          


        
相关标签:
1条回答
  • 2020-12-29 14:20

    That's not a valid HTTP path. That's the path to the folder on your computer.

    try the UrlHelper.GenerateContentUrl() method instead http://msdn.microsoft.com/en-us/library/system.web.mvc.urlhelper.generatecontenturl.aspx

    0 讨论(0)
提交回复
热议问题