开发者

RouteLink without link?

Is there some way of generating the link from the route-table without making it a link?

i.e only w开发者_JAVA技巧ww.foo.com/someroute/34 without it being linked

/M


You could use the RouteUrl extension method:

<%= Url.RouteUrl("Default", new { id = 75 }) %>

And if you want an absolute url:

<%= Url.RouteUrl("Default", new { id = 75 }, Request.Url.Scheme) %>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜