Creating Global Variables is something we have to do in ASP.NET. In Classic ASP, it just worked, but not in ASP.NET.
In this article, we will look at both of these Variables that can be used throughout our page.
▼ Frontend ▼
Place this at the top of your page.
Now, on our page, we can use either of these variables.
Create your Select Statement. Then add in your Global variable like this.
Now, anywhere on our page, we can use this.
<%=GlobalVariables.getfile%> Will get the value assigned to this Variable.
▼ Backend ▼
The same concept will work in the Codebehind as well.
Except without the Code Brackets.
GlobalVariables.getfile