Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Web Form
Message
From
01/07/2009 14:31:09
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Miscellaneous
Thread ID:
01409563
Message ID:
01409628
Views:
41
>So all of the form variables are actually bound to this datasession object in order to keep their values after the postback?

Not to step on Bob's toes he is giving you good information but I wanted to add something else.

What you are saving to the Session is just the DataSet you retrieved and bound to your controls. Since the web is stateless, it goes away except for what you saved to the session. When you need to interact with that data again, you can retrieve it from the Session again but I would also make sure it is the current DataSet on the business object.
// Retrieve your data via the business object
this.oOrder.GetMyData();
// Save your data to a Session variable named "dsOrder"
Session["dsOrder"] = this.oOrder.DataSet;

// Now later when you need to do something with this.
// Get it back into a dataset
DataSet dsOrder = Session["dsOrder"];
// But then set it as the current dataSet again on the business object
this.oOrder.SetCurrentDataSet(dsOrder);
this.Save(oOrder);
I think there are examples of this in the Dev Guide, if you don't find them let me know and I will take a look where I saw them.
Tim
Timothy Bryan
Previous
Reply
Map
View

Click here to load this message in the networking platform