我需要能够在我的网页设置动态.Net网页的链接。我知道你可以在ASP .Net中动态设置路由。
我也想用类似于ASP中的UrlHelper的方式从RouteCollection生成Urls。到目前为止,我找不到任何关于是否可以在Webforms中使用ASP中的UrlHelper的说明。
发布于 2012-09-12 14:34:59
您可能会对Scott Hanselman recently blogged about和introduced in this blog post的感兴趣。
代码示例:
<a href='<%# FriendlyUrl.Href("~/WebForms/Edit", Item.TouristAttractionId ) %>'>Edit</a>https://stackoverflow.com/questions/12382339
复制相似问题