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.
精彩评论