what is Application Object?


Application object is used to store data which available across the entire application and shared across multiple users sessions.
Data which needs to be persisted for entire life of application should be stored in application object.
It's a great place to store data which changes infrequently.

 syntax:

Application.Lock();
Application["cnt"]="count";
        To remove the application variable cnt from the application state, we need to write
        Application.Remove("cnt");
        If we want to remove all variable for application state we need to write
        Application.RemoveAll();
Application.UnLock();

No comments:

Post a Comment