Session state and multiple windows/frames

G

Guest

I'm currently working on a project developing a web application that makes
heavy use of 3rd-party controls, popup windows and frames ( not my design I
hasten to add ).
Some of the pages make use of several user controls embedded in a tab
control. Needless to say that the page size can be somewhat on the large
size, including a lot of information being stored in viewstate.

I'm currently looking for a solution to resolve the problem of the page
bloat.
My first choice was to redesign the pages to reduce the number of tabs (and
user controls) on the page - and to adjust where viewstate is used, however
the powers-that-be like their design and won't change it even though the
performance is poor.

The second option I am looking at is to try loading and unloading the user
controls dynamically - this seems to have some merit but I suspect that it
could end up being quite complex to implement due to the number of controls
and how they interact with each other.

The last option I'm looking at - and also favour - is to store the viewstate
outside of the page. I'm overriding the SavePageStateToPersistenceMedium and
loadPageStateFromPersistenceMedium method of the page to read and write the
viewstate into session state.

This seems to provide a nice quick solution. Due to the use of frames and
popup windows there is a problem (to compound the problem the powers-that-be
also want to be able to allow users to use the New Window option of Internet
explorer so that users can have multiple browser windows viwing the same data
) the upshot being that all these frames, popups and windows all share the
same session details.

I'm sorry the preambles been so long but here is the crux of the problem:
I'm writing the ViewState to and from Session("ViewState") - therefore each
time a page is loaded then it will overwrite Session("ViewState") with its
viewstate. If I have multiple browser windows open is there anyway that each
window can have its own separate session, or to be able to manage the session
state so that conflicts in the session will not occur.

Any comments or advise on this problem will be greatfully received.
 
R

Robbe Morris [C# MVP]

Well, you can use separate session variables for
different sets of ViewState. But, if you are using
that much ViewState and then storing it in
session, your site quickly eat up
a ton of RAM when traffic goes up.

I'd have to see the actual page in order to
give you any useful suggestions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top