views:

39

answers:

2

I want my url like this:

"http://domain.com/tag/高兴"

My route mapping:

routes.MapRoute("Tag", "tag/{name}", new { controller = "Tag", action="Index" });

But Html.RouteLink will encode the parameters as default. If I use Html.RouteLink in my View, the generated html is:

<a href="/tag/%E9%AB%98%E5%85%B4">高兴</a>

Is there any way to avoid this?

A: 

Changed my example.

This works in my case

<%= HttpUtility.UrlDecode(Html.RouteLink("Test", new { id = "高兴" }).ToString())%>

Make sure to change from <%: to <%=

David Mårtensson
Thanks. But I still can't generate URL without encoding.
Cadina
Thank you! It works.
Cadina
A: 

i am interested in you problem too.

heaven