consider this code:
Partial Public Class MyAspNETClass
Inherits System.Web.UI.Page
Protected Shared MyVariable As String
....
....
2 questions:
- Is Myvariable a variable used local
for each instance of the page ? Or
that variable is “shared” for all
users accessing my page ? - Is MyVariable saved in server
memory, or is it saved on the
viewstate of aspx page ?
This is 2 doubt i can’t answering by myself, so i’m asking you !
Thanks
Because
MyVariableisSharedit will be allocated in memory only once and shared by every instance of the class.It is not stored in the ViewState