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

1

6

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

Glutamine answered 5/10, 2015 at 9:52 Comment(0)
B
11

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

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

Bazil answered 5/10, 2015 at 10:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.