开发者

Lifetime of ViewBag elements in ASP.net MVC3

When will开发者_JAVA技巧 the values of the ViewBag be flushed or cleared ?


When you leave the view on subsequent request. ViewBag is created in the controller and it will live until the rendering of the view. In addition to this it is something that I would not recommend you using and replace it with view models.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜