asp.net mvc控制器的寿命是多少? [英] asp.net mvc what is the life of a controller?

查看:71
本文介绍了asp.net mvc控制器的寿命是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

控制器的寿命是多少?如果我创建一个控制器,将一些数据存储在私有字段中,那么用户将使用不同的控制器转到其他页面,然后单击链接以返回到原始控制器,在这种情况下该数据仍将存在?

what is the life of a controller? if i create a controller, store some data in private fields, then the user goes to other pages using different controllers, then clicks a link to come back to the original controller, under which circumstances will that data still be there?

谢谢!

推荐答案

对于ASP.NET MVC生命周期而言,这是一个很好的备忘单.单击原始PDF的图像.

This is a great cheat sheet for the asp.net mvc lifecycle. Click the image for the original PDF.

替代文字http://techposters.net/uploads/images/b/6/5/2/1/3ec799186e.gif

这篇关于asp.net mvc控制器的寿命是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆