I have a data repeater that is binding to an Object Data Source on a page.
I have the select working but I am having a problem with the Update.
The Object Data Source control is particularly suited for declarative programming and, in general, all those scenarios where your information fits well in the control s programming interface.
A slogan I usually apply to the Object Data Source control is, either easy or nothing.
This post was going to be a rant about how using the Object Data Source was impossible to handle exceptions thrown while retrieving or updating data.
After some experiments and reading some misleading posts I saw only three possible ways: Luckily I accidentally found the right way to do it while looking at the Event Args class properties for the Selected event.
The data source object's public properties must also expose both get and set accessors.
The page just posts back with the Edit Item Template controls still showing.
Problem is I can't figure out how to get the object back out of the repeater. Are you trying to save all the companies that appear in your repeater, or is there only one company anyway?Once i encountered the same issue but solution was very simple, one of our developer has subscribed the event in if (Page.Post Back == false) So as per the fundamentals (http protocol) server will forget binding on next post back To pass user-defined objects to a Object Data Source you must including a default constructor that takes no parameters. I'm going to give up on this approach and use my own method in the Row Command event instead. Cancel to true in certain circumstances, but they aren't being hit.