Can MVC2 or MVC3 html.routelink contain & laquo & & raquo?

What is the syntax for displaying this? My program will always display & laquo; literally in the pagination assistant that I am creating, and since switching to MVC3 it seems impossible to even crack it with Eval (string.FromCharCode)

+6
asp.net-mvc asp.net-mvc-3
source share
2 answers

Just use the appropriate UTF-8 character, and the HTML helper will take care of its encoding:

@Html.RouteLink("ยซ", new { action = "navigate", page = 1 }) @Html.RouteLink("ยป", new { action = "navigate", page = 3 }) 
+13
source share

As long as you use UTF-8 as your character set, then displaying "directly" (without encoding) is perfectly valid XHTML.

+1
source share

All Articles