Created
December 24, 2020 11:08
-
-
Save manoj-choudhari-git/34d98ede60130d276d5caab1235d637f to your computer and use it in GitHub Desktop.
Azure CDN example: .NET Core web application and Query string
This file contains 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
// STEP 1 | |
// Code in HomeController.cs, Index action | |
// New query string parameter - version | |
public IActionResult Index([FromQuery]string version) | |
{ | |
ViewData["version"] = version; | |
return View(); | |
} | |
// STEP 2 | |
// Code in _Layout.cshtml | |
// <a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">SampleApp @ViewData["version"]</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment