0
我需要能夠在ASP.Net Webforms中動態地在我的網頁中設置鏈接。我知道你可以在ASP .Net中動態地設置路由。UrlHelper與ASP .Net Webforms
我想以類似於ASP.Net MVC中UrlHelper的方式從RouteCollection中生成Url。到目前爲止,我找不到任何說如果你可以使用Web.Net的MVC中的UrlHelper。
我需要能夠在ASP.Net Webforms中動態地在我的網頁中設置鏈接。我知道你可以在ASP .Net中動態地設置路由。UrlHelper與ASP .Net Webforms
我想以類似於ASP.Net MVC中UrlHelper的方式從RouteCollection中生成Url。到目前爲止,我找不到任何說如果你可以使用Web.Net的MVC中的UrlHelper。
你可能會感興趣的FriendlyUrls Nuget package其中Scott Hanselman recently blogged about和introduced in this blog post。
代碼示例:
<a href='<%# FriendlyUrl.Href("~/WebForms/Edit", Item.TouristAttractionId) %>'>Edit</a>