Apr 20, 2009, 5:14 PM
Window management best practices
I'm creating an application that will contain many windows that will be launched by various buttons within the app. In a standard Windows desktop app, you would typically only instantiate the window when you need it and then destroy it when done. However, this seems to be a bit different, and I'm not sure the ramifications on memory resources within the browser. Currently, I have just created all the Windows and added them in code behind via the Controls.Add(window), and hidden is set to True. I then just call .show() when I need a particular window. Is there a better way to do this? It's important to know that I am doing everything with Code Behind, not using MarkUp at this time. The problem seems to be that I can't get access to a window unless it has been added upon initial load of the web site. I can't figure out how to create a new window only when needed.
Thanks.
Thanks.