Where are static variables stored in asp.net aspx page

后端 未结 3 499
后悔当初
后悔当初 2020-12-21 21:32

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

Is it in the view state? If so I guess you wouldn\'t want to stored big com

相关标签:
3条回答
  • 2020-12-21 21:53

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

    0 讨论(0)
  • 2020-12-21 22:03

    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.

    0 讨论(0)
  • 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 讨论(0)
提交回复
热议问题