Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Persisting dataset across postbacks
Message
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00924281
Message ID:
00924895
Views:
12
Morgan,

We are not opening the same patient's notes mulitple times. We are launching multiple instances of the same web form that displays different patients treatment notes. It is like having a day chart box filled with patient's charts that are coming in on a particular day. As a patient is seated in a room you would pull the chart out of the box and place it in the chart holder on the wall outside of the treatment room. Our web form eqivalent of a chartbox is a automatically refreshing web form that displays a list of patient's coming in for the day. We call it the DAYSHHEET. Our chart holder web form equivalent are the treatment notes minimized on the taskbar.

Regards,
Neil

>Yeah, that is really up to you. If your application calls for or would use more then one form then either a unique id, or ViewState. I would be worried a little bit about ViewSate because of all the information stored and performance. Is it really a possiblity that they are going to open up multiple copies of the Notes? Why not have the link always open it up in the same form?
>
>So the choice depends on your application really.
>
>Morgan
>
>
>>Morgan,
>>
>>I did the following:
>>
>>
>>// use bizobj oTxNotes to gather treatment data for the patient
>>DataSet dsTxNotes = this.oTxNotes.GetTxNotesBycTxID(tcTxID)
>>
>>// make a copy of the DataSet and persist the copy
>>if (!IsPostBack)
>>{
>>  Session["dsEntryData"] = dsTxNotes.Copy()
>>}
>>
>>
>>I then can access the stored DataSet with persistance after postbacks:
>>
>>  DataSet dsEntryData = (DataSet)Session["dsEntryData"]
>>
>>
>>This worked great but I found it to be flawed. I launch multiple copies of the treament notes web form and keep up to 5 patient's treatment notes minimized on the taskbar. Since all of the minimized web forms have Session["dsEntryData"] set in Page_Load, the pages step on each others toes because they are all operating within the same session. I think ViewState might be better to persist the data per web form. Should I save dsTxNotes to XML and store the XML to a hidden label control and shuffle the label back and forth through postbacks? Or should I just come up with a scheme to name the session variable with a unique name per form launch.
>>
>>Regards,
>>Neil
>>
>>
>>
>>>Yeah, I would store it in SessionState, instead of storing it in ViewState. If the DataSet were to get to rather large it could become a problem w/ performance in ViewState.
>>>
>>>Morgan
Previous
Reply
Map
View

Click here to load this message in the networking platform