Access request/route paramters in Razor view
In Asp.NET MVC, in route config we can define a route url as below

 name: "Default",
	 url: "{controller}/{action}/{id}",
	 defaults: new { controller = "Home", action = "Index", id= UrlParameter.Optional }
Here the id parameter can be accessed via controller action input paramters

But if you want to access the ID parameter in view page, instead of assigning this into ViewData and then accessing from View page, you can get the value from Viewcontext as below