[英]Can an MVC2 or MVC3 html.routelink contain « and »?
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 )
我的程序将始终在我正在创建的分页助手中呈现«并且自从切换到MVC3后,似乎没有办法用Eval(string.FromCharCode)来破解它
Just use the corresponding UTF-8 character and the HTML helper will take care of the encoding it: 只需使用相应的UTF-8字符,HTML帮助程序将处理它的编码:
@Html.RouteLink("«", new { action = "navigate", page = 1 })
@Html.RouteLink("»", new { action = "navigate", page = 3 })
只要你使用UTF-8作为你的角色集,然后直接显示«没有编码它是完全有效的XHTML。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.