Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a general ASP.NET MVC helper for generating links?

I know of the ASP.NET MVC ActionLink helper for generating links to the application's actions, and find it very useful. However, I haven't been able to find a corresponding helper for generating links based on absolute URLS (i.e., to external resources). Is there a helper for this purpose?

Edit: To make my question absolutely clear, I'm (obviously) not looking for a way to generate the URL part, in the way that ActionLink generates action URLs. I'm just interested in safe and easy hyperlink generation.

like image 496
aknuds1 Avatar asked Oct 10 '22 15:10

aknuds1


1 Answers

I'm afraid there isn't. But you can write your own helper for that if you want the view to look nice with the consistent Helper formatting.

http://www.asp.net/mvc/tutorials/creating-custom-html-helpers-cs

like image 61
Illuminati Avatar answered Oct 14 '22 02:10

Illuminati