G
Guest
Hi,
I have setup my asp.net app so that i have one globalobject that contains
all information for my application. I am trying to work out the best way to
implement the applicationstate object with my variables.
Would i get the object from the applicationstate on page_load? and then keep
the global variable in memory until a button is clicked or a certain event
takes place? But i dont know how to acess this variable if it is created in
the page_load function:
private sub page_load()
dim cf as MyGlobalFunctions
cf = application.Get("common")
cf.DoSomething()
end sub
private sub anotherButton_click()
'i cant access cf in here! how do i do this?
end sub
If this is similar to how you do it, then when do i add the cf object back
to the application state?
Application("common") = cf
because i cant do it on the anotherButton_click() function......
I was thinkin of another way to do it would be to dim the global object, get
it from appstate, and then add it back to appstate after change is made on
all event functions. This would work but it means i am creating so many of
the same object within a page....
How is the best way to do this?
Thanks
I have setup my asp.net app so that i have one globalobject that contains
all information for my application. I am trying to work out the best way to
implement the applicationstate object with my variables.
Would i get the object from the applicationstate on page_load? and then keep
the global variable in memory until a button is clicked or a certain event
takes place? But i dont know how to acess this variable if it is created in
the page_load function:
private sub page_load()
dim cf as MyGlobalFunctions
cf = application.Get("common")
cf.DoSomething()
end sub
private sub anotherButton_click()
'i cant access cf in here! how do i do this?
end sub
If this is similar to how you do it, then when do i add the cf object back
to the application state?
Application("common") = cf
because i cant do it on the anotherButton_click() function......
I was thinkin of another way to do it would be to dim the global object, get
it from appstate, and then add it back to appstate after change is made on
all event functions. This would work but it means i am creating so many of
the same object within a page....
How is the best way to do this?
Thanks