asp.net - How to access httpapplicationcontext variable from aspx page? -


I have created an application variable in my global .asax.cs file with the code below: -

  Protected Zero Application_Start (Object Sender, EventArgs e) {Application ["Visitor"] = 0; } Secure zero session_start (object sender, eventArguesE) {application.Lock (); Application ["Visitor"] = Convert ToInt32 (application ["Visitor"]) + 1; Application.UnLock (); } Secure zero session_und (Object Sender, EventAgds E) {application ["Visitor"] = Convert.OINT 32 (Application ["Visitor"]) - 1; } I want to use this  application ["Visitor"]  variable in my  classic ASPX page . I am writing down the code for this but it is giving me the error: -  
  sub-window_download () dim ii = application ["visitor"]. Toasting () End Sub   

Can you please help me use this variable on various ASPX pages?

If you are using Vb.net, use [] instead of parentheses [] Is to use:

  sub windows_download () dim ii = application ("visitor"). Toasting () End Sub    

Comments