Easy Tutorial
❮ Prop Size Folder Met Move File ❯

ASP Lock and Unlock Methods

Lock Method

The Lock method prevents other users from modifying variables in the Application object (ensuring that only one user can modify Application variables at a time).

Unlock Method

The Unlock method allows other users to modify variables stored in the Application object (after it has been locked using the Lock method).

Syntax

Example

The following example uses the Lock method to prevent more than one user from accessing the variable visits simultaneously, and uses the Unlock method to unlock the locked object, allowing the next user to increment the value of the variable visits:

❮ Prop Size Folder Met Move File ❯