keeping variable info in a code behind / class file
Posted on 2005-04-18
I'm using asp.net with vb ...
I've got a webform, a code behind page, and a functions.vb page ...
everything works fine, but I want to share variables between functions ...
on my code behind page, i'll call a function in functions.vb, then it will return to the code behind, where i'll call another function from functions.vb ... when i access functions.vb again, i want some variables to be saved ... basically connection variables, that sort of nature ..
Public Class functions
Dim objConnection as connection
objConnection = whatever
'I want to be able to access the stored info from objConnection here when I called it the last time
on my web form:
functions.Function2() 'here, i call function2 from the class page, there i want to be able to access objConnection without having to reset the variable ... there's more to this obviously than what i am coding .. but the framework should be the same as in this example ..