This website is intended as archive for old content and forums.
Please visit http://opf3.codeplex.com for the project's new website.

General Discussion

FORUM TOPIC

What is Opf3? Why is Opf3? How is Opf3? All these burning questions and issues discussed here.

RSS
John Padilla
Posted on the 12/29/06 7:14 PM
ASP.NET ObjectDataSource and Updating Persistant objects
Reply Quote
 Simple question:

Once you bind an objectset<T> (in my case T is type Employee) to a datasource via Select etc etc, you no longer have the instance of the objectse<Employee> to reference. Therefore how do we Update the Employee ObjectSet? We cannot just pass the ObjectSet to this event because it no longer exists.

Note ObjectDataSource keeps an instance of the object that delivers the Select, Insert, Update and Edit within it for the duration.

Christian Liensberger [Moderator]
Posted on the 01/03/07 3:18 PM
RE: ASP.NET ObjectDataSource and Updating Persistant objects
Reply Quote
 Since the ObjectDataSource doesn't put the object into the viewstate, you need to do some manual work here. You need to put the ObjectSet<T> to the ViewState and do the update of the changes to the persistent object manually.

Regards,
Christian

PS: Sorry for the late reply. I have been on vacation.

All times are in GMT.