ASP MVC Friendly URL's and Relative Path Images

后端 未结 4 687
野趣味
野趣味 2021-01-17 08:19

I have an ASP.NET MVC page, where I am trying to show friendly URL\'s.

So, I have a Category View in the Home Controller, that accepts a categoryKey value to get the

4条回答
  •  情书的邮戳
    2021-01-17 08:35

    You can use the relative path " ~/ " to refer to the current virtual directory where the page is located. Try to add runat="server" attribute to your "img" tag and "~" sign in "src" attribute:

    Bikes
    

提交回复
热议问题