Created
October 25, 2013 11:40
-
-
Save csharpforevermore/7153352 to your computer and use it in GitHub Desktop.
Get the URL for a specific Umbraco API Controller (in this example, the Products API controller)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@{ | |
Layout = null; | |
} | |
@{ | |
string url = string.Format("{0}://{1}{2}?nodeId={3}", Request.Url.Scheme, Request.Url.Authority, Url.GetUmbracoApiService<ProductsApiController>("GetProductById"), Model.Content.Id); | |
} | |
<a href="@url" target="_blank">@url</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment