
Untitled
By: a guest on
Jun 1st, 2012 | syntax:
None | size: 1.00 KB | hits: 8 | expires: Never
right way to specify the src for an image in MVC3
<img src="images/img2.jpg" alt="" title="" />
<img src="@Url.Content("~/images/img2.jpg")" alt="" title="" />
public static class ImageExtensions
{
public static MvcHtmlString Image(this HtmlHelper helper, string imageRelativeUrl);
public static MvcHtmlString Image(this HtmlHelper helper, string imageRelativeUrl, string alt);
public static MvcHtmlString Image(this HtmlHelper helper, string imageRelativeUrl, string alt, object htmlAttributes);
public static MvcHtmlString Image(this HtmlHelper helper, string imageRelativeUrl, object htmlAttributes);
public static MvcHtmlString Image(this HtmlHelper helper, string imageRelativeUrl, IDictionary<string, object> htmlAttributes);
public static MvcHtmlString Image(this HtmlHelper helper, string imageRelativeUrl, string alt, IDictionary<string, object> htmlAttributes);
public static TagBuilder Image(string imageUrl, string alt, IDictionary<string, object> htmlAttributes);
}