Persistent Objects in ASP.NET

Posted by user204588 on Stack Overflow See other posts from Stack Overflow or by user204588
Published on 2010-05-22T15:53:50Z Indexed on 2010/05/22 16:01 UTC
Read the original article Hit count: 161

Filed under:
|

Hello, I'm trying to find the best way to persist an object or in use the same object at a later point in the code. So, I create an object, then you're redirected to another page(a form) that needs to use variables from that object. That form is submitted to a third party and there is stuff done on their end and then they request a page on my application that runs some more code and needs the objects variables again.

  • I thought about Database but this is all done at once. This is done during a user checkout process and after it's over, there's no reason to retrieve this object again. So adding and retrieving from a database seems like it would be overkill and I think it would make the process slower.
  • Right now I'm using Session but I keep hearing not to use that but no one is really saying why I shouldn't except it is bad practice.
  • I can't really use post back values because the pages don't work that way. The checkout process starts off in a dll code that redirects to the form that is submitted to the third party and the a page is requested by the third party.

So, I'm not really sure of the best way. What are all the options and what does everyone recommend as the best way?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about object-persistence