title: Inline if condition inside image src
body: <p>I am using MVC 4 where I have an image, which render's the image dynamically like:</p>
  
  <pre><code>&lt;img id="imgThumbnail" src="@Url.Content(@ControlUtilities.FormatUrl(" ~/GetImage?imageid=" + @Model.ImageID))" /&gt;
  </code></pre>
  
  <p>Now, I want to check, if <code>@ControlUtilities.FormatUrl("~/GetImage?imageid="+ @Model.ImageID)</code> return's null or blank then replace it with <code>'/img/noimage.gif'</code></p>
  
  <p>Something like:</p>
  
  <pre><code>src= "@Url.Content(@ControlUtilities.FormatUrl("~/GetImage?imageid=" + @Model.ImageID)) || '/img/noimage.gif'"
  </code></pre>
  
  <p>Is it possible to do it inline in HTML itself? Or I have to handle it thru jQuery?</p>
  
  <p>Why I want to do this is, when ever the API <code>GetImage</code> return's blank/null, the output is an empty image tag or to be precise broken image is getting displayed. Alternatives would also be helpful.</p>