Link to home
Start Free TrialLog in
Avatar of Kokas79
Kokas79

asked on

WinForms "Session" variable?

Hello

Is there anything similar to the WebForms Session variable for WinForms? I want to add enter to a database by following a Wizard style approach...one form appearing after the other...how can i carry the value of a field?


Thanks
Avatar of Kokas79
Kokas79

ASKER

What i've done so far is have all my forms inherit from a Template form and declare a property in there to store the value of the field i'm interested in, so as to use it in each form.
Any other approach?
You can add static class member to the base class and keep required data in it.
Avatar of Kokas79

ASKER

is that with the Shared keyword in VB?
ASKER CERTIFIED SOLUTION
Avatar of AlexFM
AlexFM

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Kokas79

ASKER

thank you...i implemented some shared properties.
what about the Application variables in asp.net? anything like that for Winforms?
I don't think that there are additional levels in Windows forms applications. Non-shared members are kept with every class instance, and shared member is one per application. If there are number of running application instances, there is not any relation between them (unless you want to implement this using some kind of interprocess communication).
Avatar of Kokas79

ASKER

ok...i get the point...WinForms suck! at least u dont have the postbacks.....:)