Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between UrlHelper.Route and UrlHelper.Link methods?

Looking at the msdn (UrlHelper.Route, UrlHelper.Link) they seem quite identical. Are there any reasons to use one or the other?

like image 532
jaccus Avatar asked Oct 05 '15 09:10

jaccus


1 Answers

Route() returns a relative URI, Link() an absolute one.

Source: GitHub. Link() prepends Request.RequestUri to the result of Route().

like image 83
CodeCaster Avatar answered Oct 12 '22 17:10

CodeCaster