Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MVC 3 - _Layout.cshtml. Add a logo to the site

I'm new to MVC 3, I'm trying to add an Image to the _Layout.cshtml file. I tried

<img runat="server" id="img_logo" alt="Logo" src="Content/Images/mailworks.png" />

no success. The logo only appear on some views. on others views for some reason the image is supposed to be in some other location - found it using firebug.

like image 239
Kulpemovitz Avatar asked May 17 '12 08:05

Kulpemovitz


2 Answers

Try this:

<img id="img_logo" alt="Logo" src="@Url.Content("~/Content/Images/mailworks.png")" />
like image 57
Aleksei Pugachev Avatar answered Oct 14 '22 17:10

Aleksei Pugachev


Use this:

<img src="@Url.Content("~/Content/Images/mailworks.png")"...
like image 31
serge.karalenka Avatar answered Oct 14 '22 18:10

serge.karalenka