Saturday, June 18, 2016

The Url.Action thing is not just for Razor.

It works just fine inside a Controller Action too.

var whatever = Url.Action("Bar","Foo");

 
 

This will create a relative path starting with a slash and leaving off the domain name and the http/https opening.

No comments:

Post a Comment