Storing structured types in request

D

Dharmesh

Hi every1,

I am learning ASP.NET and came accross problem of storing my classes object
and I want its scope to be request. Is there a way do that. I found the only
way to store structured values in with scope request was with ViewState, but
for the ViewState to work the page has to post back to itself. But my page
does not posts back.

I would really appreciate your help.

Thank you very much,

Dharmesh
 
H

Hans Kesting

Dharmesh said:
Hi every1,

I am learning ASP.NET and came accross problem of storing my classes object
and I want its scope to be request. Is there a way do that. I found the only
way to store structured values in with scope request was with ViewState, but
for the ViewState to work the page has to post back to itself. But my page
does not posts back.

I would really appreciate your help.

Thank you very much,

Dharmesh

Are you sure you need "request" scope? It's not very long, from the moment the
browser requests a url in your site to the moment the server is done processing it.
Even if the generated page contains images, those are requested via new requests.

You can add (private) variables to the page's codebehind that you can use during
processing. No concurrence problems: every request to that page gets serviced
by a new instance of this class.

Hans Kesting
 
D

Dharmesh

Thank you very much scott. Your article gave me a good reference too. This
is exactly what I needed.

Thanks.

Dharmesh
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top