How to Declare and Use Application Variables in ASP.Net
Author: DevASP
Download Source Code : 324_app_variable.zip
In ASP.net application variables are very useful application variables are use for the counter of visitors of sites and also for the other purpose and these are very easy to declare and use.
In this simple example you will learn to declare and use of application variables. Firstly create a webform and place a label having text Enter Value, a textbox with name txtvalue. Then create a button having text save and finally create a button with text goto form2.
- This statement is for declare and set value of the application variable
In this statement value1 is the name of the application variable.
Note: This value is stored when ever the server is online on which your website is hosted and it is accessable for the new user also.