简体   繁体   中英

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

What's the syntax for displaying this? My program will always render « literally in the pagination helper I am creating, and since the switch to MVC3 there seems to be no way to even hack it with Eval( string.FromCharCode )

Just use the corresponding UTF-8 character and the HTML helper will take care of the encoding it:

@Html.RouteLink("«", new { action = "navigate", page = 1 })
@Html.RouteLink("»", new { action = "navigate", page = 3 })

只要你使用UTF-8作为你的角色集,然后直接显示«没有编码它是完全有效的XHTML。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM