Hi,
I used ResolveUrl in ASP.Net WebForms. But ResolveUrl does not work in ASP.Net MVC Razor.
Thus please tell how to do it?
<img alt='' src='<%=ResolveUrl("~/Images/DD.png")' />
You can use @Url.Content function in ASP.Net MVC Razor.
Replace
With
<img alt='' src='@Url.Content("~/Images/DD.png")' />
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.