skip to content »

Detailsview updating newvalues empty

detailsview updating newvalues empty-46

The Update stored procedure takes three parameters--the record id, and two data fields. However, when the I submit the update, I get the following error: Object Data Source could not find a non-generic method Update that has parameters: [all 21 table columns] I am trying to only pass the (3) necessary fields to the Update stored procedure, but the Details View is apparently trying to update using all of the fields it received from Select.

detailsview updating newvalues empty-66detailsview updating newvalues empty-40detailsview updating newvalues empty-76

the Form View Update Event Args always has the Old Values and New Values collection empty.(Keys is too).You'll be able to ask any tech support questions, or chat with the community and help others.Here's the setup I have a Details View whose Data Source is an Object Data Source. Learn various methods of problem solving unique to the . The Grid View only reads data from the Activities table and does not appear to affect this problem. Old Values has all values of fields bound on template. Form View2 talks to my Activities table and has an Item Template, Insert Item Template and an Edit Item Template. Net 2.0 framework, and I have a serious problem with the page I'm currently working on.

As far as I can tell, the problem is that the program is not passing updated information to the New Values array that you can access from the Item Updating event args. The code and markup looks fine to me, in fact I have a page with similar information on it that works fine. That Form View is nearly identical to one on the page that doesn't work; in fact, I copied and pasted the markup to keep the formatting correct.

Not sure if that example exactly relates as I'm creating the Bound Fields on the fly: ...

NET - forum discussing the Microsoft languages including C#, VB. All of the controls read from the tables with no problem and switch modes with no problem, but when going into Update mode, changing something and clicking the Update button, it does not save the information to the tables. I would also think that the problem is page-specific, however I can't see any real difference in the page that works and the page that doesn't, except for the fact that the page that works only has one formview and that's it.

Mode Changing behaves differently when setting the data source explicitly(documented in the docs) but i can't find anything for the Item Updating event. I feel i'm missing something simple but i'm just not sure what!

Maybe somehow i need to populate the New Values and Old Values myself? Yes, you need to use Object Data Source here to take full advantage of ASP. You can learn more information about Data Source controls from following articles: #Data Source Controls and Declarative Programming Source Control #Data Points: Data Source Controls in ASP.

I have used the Item Updating event handler for the Details View and i am populating the Mail Message. New Values("Some Field") with a value of null, it simply does not exist. "Flinky Wisty Pomm" wrote: If you just want to avoid duplicated code, why not move it into another method?