开发者

RouteLink without link?

开发者 https://www.devze.com 2022-12-13 14:56 出处:网络
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/34without it being linked

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

精彩评论

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