In MVC 5 I can do stuff like
<div class="comment-right-col">publicclassCustomRouteHandler:MvcRouteHandler{protectedoverrideIHttpHandlerGetHttpHandler(RequestContext requestContext){// add to HttpContext requestContext.HttpContext.Items["Custom"]= data;// or RouteData requestContext.RouteData.Values.Add(key, value);}returnbase.GetHttpHandler(requestContext);}}// define route with custom handler Route customRoute =newRoute( url:..., defaults:null, constraints:..., routeHandler:newCustomRouteHandler()}); routes.Add(customRoute);
How can I do this in MVC 6 / vNext?
</div>