Hi,
I have a very simple web application which consists of one main page and a background C# class containing the logic code. At the moment I am instantiating this object on the page's 'Page_Load' method (thus getting a new object each time the page is refreshed). This doesn't strike me as a particularly good or efficient way to do it.
Would it be better to keep this object stored in a session? Or simply copy the code out of it into the page class? Is there a better way? Or is it ok as it is?
Thanks
David
I have a very simple web application which consists of one main page and a background C# class containing the logic code. At the moment I am instantiating this object on the page's 'Page_Load' method (thus getting a new object each time the page is refreshed). This doesn't strike me as a particularly good or efficient way to do it.
Would it be better to keep this object stored in a session? Or simply copy the code out of it into the page class? Is there a better way? Or is it ok as it is?

Thanks
David