Moving to ASP.NET MVC 2, prevent link text encoding in HtmlHelper.ActionLink method
Posted
by Giedrius
on Stack Overflow
See other posts from Stack Overflow
or by Giedrius
Published on 2010-03-19T10:53:45Z
Indexed on
2010/03/19
11:01 UTC
Read the original article
Hit count: 690
Hi, I'm migrating to MVC 2 and I have a method:
private MvcHtmlString WriteCategoryLink(CategoryViewData category)
{
var spanBuilder = new TagBuilder("span") {InnerHtml = category.Name};
return htmlHelper.ActionLink(spanBuilder.ToString(TagRenderMode.Normal), MVC.Category.Index());
}
Problem is, that it encodes link text, but i don't want to, may be someone has a solution?
© Stack Overflow or respective owner