skip to content »

sushisad.ru

Asp net formview itemupdating newvalues

asp net formview itemupdating newvalues-13

(This posting is provided "AS IS", with no warranties, and confers no rights.) -------------------- | Thread-Topic: Form View Item Updated: New Values array not getting values on update | thread-index: Ac Xf J0CS2Rss I9h SQ/erw A1i4om Fx A== | X-WBNR-Posting-Host: 66.166.163.242 | From: "=? The page | has, among other things, two Form Views and a Grid View control, each with its | own Sql Data Source.

asp net formview itemupdating newvalues-13asp net formview itemupdating newvalues-15asp net formview itemupdating newvalues-1

This allows you to provide an event-handling method that performs a custom routine, such as checking the results of an update operation, whenever this event occurs.Form View2 talks to my Activities table | and has an Item Template, Insert Item Template and an Edit Item Template.The | Grid View only reads data from the Activities table and does not appear to | affect this problem.-Make sure that all of the parameters required by your stored procedure, query, or data source have values and are named correctly in either the Keys or New Values collections (and make sure that no duplicates exist).In some cases (usually when an Object Data Source is involved), I've had to override the values set by the Form View control, by doing something like this: It's not pretty, but it give you absolute control over what gets passed to the Data Source. New Values collections to see if the contents are what you expected.A Form View Updated Event Args object is passed to the event-handling method, which allows you to determine the number of records affected and any exceptions that might have occurred.

If it's bound via Linq Data Source, Sql Data Source or Object Data Source I suggest you have a look at the Updating Event.

The rows from the sqldatasource display fine in the Form View and I can edit them.

When I click Update, I get the Item Updating event but not the Item Updated event and the revisions are not written to the database. In your Item Updating event handler, make sure of the following things: -If you are not using optimistic concurrency checking, remove any old values the Form View may be placing in the Old Values collection.

Would you try comparing the problem page with the other page which works correctly to see whether there is any diference?

Also, you can test through a sample database table like the Categories table in northwind db to see whether you'll encounter the same problem.

If there're anything else unclear, please feel free to post here. =" | MIME-Version: 1.0 | Content-Type: text/plain; | charset="Utf-8" | Content-Transfer-Encoding: 7bit | X-Newsreader: Microsoft CDO for Windows 2000 | Content-Class: urn:content-classes:message | Importance: normal | Priority: normal | X-Mime OLE: Produced By Microsoft Mime OLE V6.00.3790.0 | Newsgroups: microsoft.public.dotnet.framework.aspnet | NNTP-Posting-Host: TK2MSFTNGXA03gbl 10.40.2.250 | Path: TK2MSFTNGXA01gbl!