Formview itemupdating parameters

Additionally, there are some fields, such as Last Updated By, Last Updated Date that need to be seen, but not edited.The stored procedure on the backend takes care of this, and these are not parameters for the Update method.Again, formview is trying to pass these parameters So given that, I have defined the following even handler for a simple form view: (not sure if this is the way to proceed given the above, but...) protected void Form View1_Item Updating(object sender, Form View Update Event Args e) My questions are as follows: 1) Is this the right approach?2) Is so, when I cancel the edit (because I did the update myself), and change mode, the Form View returns to read only mode as inteneded (good so far).Work around I am going to do: Programmatically fill in datasource's parameters and promatically invoke datasource's updating event. But I am so reluctant because with so many aspx I have written, I know ASP.NET is smart enough to do it for me automatically !! Supplement information: Upon clicking Edit Item Template's update link button: Item Command event is triggered, then return and goes no further. This is my foresaid work around solution: programmatically fill in datasource's parameters, when apparently ASP. However, I am still appreciate if anyone can explain this problem.This is a strong evidence of such a possible exception.One piece of additional information: certain bind fields in the formview's edit template are optionally set to invisible during the course of editing.

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.Generally you should not have to do this if the controls in your Form View are all bound using Bind() for two-way databinding (instead of Eval), but at the very least you could put a break point in Item Updating and open up the e. A next step would be to launch SQL Server Profiler to run a trace and examine the actual query being performed. Did you remember to put all the parameters in the sqldatasource under the insert and update parameters list?Oh also are you setting the cancel property at all in the itemupdating event?-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.