Link to home
Start Free TrialLog in
Avatar of lateapex
lateapex

asked on

Persist a custom object across a postback

Experts,
I have a custom object that contains other custom objects. I would like to persist it across a postback.

The parent object is a user profile object that contains a phone object, address object ect.

The application runs on a webfarm so I don't think I should use the session variable.

I tried View State but received an error related to serialization.

What do you suggest?

Thanks!
Bob
Avatar of jmwheeler
jmwheeler

What I typically do with dynamically added controls is to add them in my Page_Load procedure.  This will add the controls when the page loads and on every post back.  Also, if you give them the same ID each time the information entered in to the controls should repopulate from ViewState.
Avatar of lateapex

ASKER

jmwheeler,

This is not a control, it's a custom object that has previously been populated with data.

Thanks!
bob
ASKER CERTIFIED SOLUTION
Avatar of jmwheeler
jmwheeler

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you