Click to See Complete Forum and Search --> : Public Variables in a Module? Application, Session???


sinan1
February 21st, 2005, 01:19 AM
Hi,

I have used few public variables in a module in a Web Application using VB.Net.

I was under the impression that these variables behave like Session variables with new instances for the different users.

The application worked fine for a single user but when I published it and more than one user were using the application, these public variables were shared between all the users, somewhat like Application variables.

Could someone please shed some light on the relation between these public variables and Session/Application variables

Thanks.

luonghien
February 22nd, 2005, 02:55 AM
you can use application variables for multi users

sinan1
February 22nd, 2005, 03:38 AM
Many thanks.

I know that I can use Application variable for multiusers.

My question was: does a public variable in a module behave like an Application variable?

Sukim
February 23rd, 2005, 02:59 AM
NO it doesnot

jcmorin
February 24th, 2005, 06:39 PM
In ASP.NET variable must be saved server side or client-side and send to the browser every-request.

Server side solution:
- Application (Used by everyone)
- Cache (User by everyone, but will be dropped if ressource are required)
- Session (Per user)

Client side solution:
- viewstate (works only on the same page with postback)
- cookie (limited in size and datatype)

Hope that help.

--------------------------
Jean-Claude Morin, MCP
Software Developer
2k1Soft, Canada