Passing Objects between Pages

  • Thread starter Thread starter VijayAnand
  • Start date Start date
V

VijayAnand

hi all,
In a Web Application i want to add details in a class's object
and pass the object from one page to another page and then retrieve
the details from the object in the latter page.how can i do this.

VijayAnand.
 
use session variable

VijayAnand said:
hi all,
In a Web Application i want to add details in a class's object
and pass the object from one page to another page and then retrieve
the details from the object in the latter page.how can i do this.

VijayAnand.



----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption
=---
 
You can add the instance of the class to the first page's Context, and use
Server.Transfer to transfer control to the second page. The Context is
transferred with the execution thread, and you can then fetch the class back
out of the Context.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

VijayAnand said:
hi all,
In a Web Application i want to add details in a class's object
and pass the object from one page to another page and then retrieve
the details from the object in the latter page.how can i do this.

VijayAnand.



----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption
=---
 
And, you must cast the session variable when you retrieve.
eg.
class2 test2=null;
test2=(class2) Session["variablename"];

Prodip
 
Back
Top