Search code examples
asp.net-mvc-3urlurl-rewritingurlrewriter.net

An elegant way of showing URL on page


Is there an elegant way of showing URL on page using ASP.NET MVC3 .The method I'm looking for should accept contollerName,actionName and routeValue(similiar to @Html.ActionLink() by arguments)

e.g.Code: Here's the link: @thatMethod("Show", "Post", new { Post = 0 })

e.g.Result: Here's the link: http://localhost:3120/Post/Show/0

EDIT 1: I dont wan't it to be hyperlink,just plain text.

EDIT 2: It needs to show domain ("http://localhost:3120" in previous example)


Solution

  • This is an even better solution.