开发者

Where are static variables stored in asp.net aspx page

开发者 https://www.devze.com 2023-02-22 21:17 出处:网络
Hi can someone please tell me where the static variables are stored in asp.net aspx page. Is it in the vi开发者_运维技巧ew state? If so I guess you wouldn\'t want to stored big complex objects?The st

Hi can someone please tell me where the static variables are stored in asp.net aspx page.

Is it in the vi开发者_运维技巧ew state? If so I guess you wouldn't want to stored big complex objects?


The static variables are stores as global variables per asp.net process.

They are not stores on view state. So if you use only one asp.net process all users see the same variables.


It is stored in memory just like a Console Application or Windows Forms.


Static variables has application scope and is stored in memory as mentioned. This means that it will be shared among pages and that the values wont get disposed until the app pool is recycled.

0

精彩评论

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