开发者

asp.net mvc querystring param

开发者 https://www.devze.com 2023-01-04 10:01 出处:网络
i call page like host/home/controller/id. now in view i want to get \'id\', i do it like t开发者_如何学Chis

i call page like host/home/controller/id. now in view i want to get 'id', i do it like t开发者_如何学Chis

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...

0

精彩评论

暂无评论...
验证码 换一张
取 消