I'm a beginner with ASP.NET MVC and I'm trying to set the src of an image with razor in a asp.net MVC website using an If statement.
this code works :
<img src="@Url.Action("GetPersonPhoto", "Home", new RouteValueDictionary( new { cardid = "696969" }) )" />
I want to add :
@if(Model.HavePhoto)
And set the src to :
"~/Content/images/header-logo.png"
if HavePhoto is false...
How can I do it ?