i call page like host/home/controller/id. now in view i want to get 'id', i do it like this
ViewContext.RouteData.Values["id"]
is any other short way?
i call page like host/home/controller/id. now in view i want to get 'id', i do it like this
ViewContext.RouteData.Values["id"]
is any other short way?
The best place to retrieve it would be in your Model... if present, which I think it alway should...