Recommend this page to a friend! |
Classes of Gjero Krsteski | PIMF | manuscript/6d.-Generating URLs.md | Download |
|
DownloadGenerating URLsRetrieving the application's base URL:
Generating a URL relative to the base URL:
Generating a HTTPS URL:
Retrieving the current URL:
Retrieving the current URL including query string:
URLs To RoutesGenerating a URL to a named route:
Sometimes you may need to generate a URL to a named route, but also need to specify the values that should be used instead of the route's URI wildcards. It's easy to replace the wildcards with proper values: Generating a URL to a named route with wildcard values:
URLs To Controller ActionsGenerating a URL to a controller action:
Generating a URL to an action with wildcard values:
URLs To AssetsGenerating a URL to an asset:
URL HelpersThere are several global functions for generating URLs designed to make your life easier and your code cleaner: Generating a URL relative to the base URL:
|