Within the view that is returned from a URL such as /Controller/Action/1 (assuming the default route of controller/action/id), how can I get access to the ID from within the Vie
We can pass id as Route Data or QueryString, so to support both of them i recommend this way:
var routeValues=Url.RequestContext.RouteData.Values;
var paramName = "id";
var id = routeValues.ContainsKey(paramName)?
routeValues[paramName]:
Request.QueryString[paramName];