PassingObjectstoWebForms

J

J

I have an object that gets created when the first ASP.NET webform, of
the web app, is opened. I need to pass this object to other webforms as
they are opened and keep the scope in the same session. How can I do this?

Thanks
 
R

Rick Strahl [MVP]

HI J,

You can store the object into a Session var and pick it up in following
forms. This works well assuming that the object you are storing is
serializable.

If you're using Server.Transfer() or Server.Excute() you can also use
Context.Items() to store request specific info to pass to transferred pages.

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
 

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,787
Messages
2,569,627
Members
45,328
Latest member
66Teonna9

Latest Threads

Top