【发布时间】:2011-05-04 19:31:37
【问题描述】:
如果我有这样的扩展名:
public static string ImageLink(this HtmlHelper htmlHelper,
string imgSrc,
string alt,
string actionName,
string controllerName,
object routeValues,
object htmlAttributes,
object imgHtmlAttributes)
{
return @"<img src=""../../Content/images/english.png"" /> ";
}
我在这样的局部视图中使用它:
@Html.ImageLink("../../Content/images/english.png","English", "ChangeCulture", "Account", new { lang = "en", returnUrl = this.Request.RawUrl }, null,null)
我有这样的输出:
知道为什么吗?
【问题讨论】:
标签: c# asp.net asp.net-mvc-3 razor