Take the 2-minute tour ×

I need to be able to set up links in my webpages dynamically in ASP .Net Webforms. I know that you can set up routes dynamically in ASP .Net.

I want to generate Urls too from the RouteCollection in a similar way to the UrlHelper in ASP .Net MVC. So far I couldn't find anything that says if you can use the UrlHelper from ASP .Net MVC with Webforms.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

You might be interested in the FriendlyUrls Nuget package which Scott Hanselman recently blogged about, and introduced in this blog post.

Code example:

<a href='<%# FriendlyUrl.Href("~/WebForms/Edit", Item.TouristAttractionId ) %>'>Edit</a>
share|improve this answer

Your Answer


