They won't, every time a postback occurs on the page, they'll be reset.
Using Public Variables in any context isn't probably a good idea...you can
use a class in general with Static or shared properties depending on your
prog language. However, in ASP.NET, a module for instance will be shared
among ALL Users which is seldom desireable.
Instead, store things in Session Variables. They give you the same effect
as public, are isolated to the session and can be strongly typed. The best
of all worlds.
Session("SomeNameForAVariable") = someObject
Dim someNewObject as someObject
someNewObject = CTYpe(Session("SomeNameForAVariable"), someObject)
You can hit this from any page in your app.
HTH,
Bill
"Jose Meireles" <jm*******@myconnections.biz> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Hi everyone,
I'm trying to use public variables in a web form to hld specific values.
What happens is that the public variables (declared as public x as y in
the beginning of the class), doesn't seem to hold the value from function call
to function call.
Does anyone can help me abou this?
best regards
JM