Hi guy,

i'm newbie of .net language. Last week i found a new method at the .net with vb.net language. That is in the Global.asax, you are enable to store a global variable. The common at below: Application("ABC")="CDE" i doubt that this method with cookies or session. Besides this, i confuse that when i need this method and when i need to cookies or session?

Recommended Answers

All 3 Replies

Application("abc") creates a global variable to your application, it is accessible from all sessions(from all browsers), session("abc") creates a browser specific variable for your application, only current session holder can access that variable; cookies("abc") creates a browser specific variable using the cookies on client computer, so it does not consume any memory on the server.

for detailed information you can search, "state management in asp.net"

Application("abc") creates a global variable to your application, it is accessible from all sessions(from all browsers), session("abc") creates a browser specific variable for your application, only current session holder can access that variable; cookies("abc") creates a browser specific variable using the cookies on client computer, so it does not consume any memory on the server.

Thanks for your reply. But i still confuse that what means for Applicaton("abc") is acessible from all session(from all browser)? what means for from all browser? Can you explain for details?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.