On top of that, the table being updated had over 50 columns, so typing in 50 lines just to initialize the parameters was required, but I decided to do something else instead.The parameters being sent to the stored procedure were identically named to the column names.The legacy code in the SQL data source used a update statement with parameters.Normally the details view control automatically detects whether to pass a null in the parameter.
I was stocked for sometime using the 2.0 Details View control to Edit/Update data.
This means the data access layer was bypassed completely, so any business logic that dealt with encryption on this page had to use a different execution path. The problem could be divided into two tasks: The first task was the easier of the two, as it just involved referencing the encryption library from the code behind page and calling the function inline in the aspx page.
So, the method in the code behind page would look like something like this: However, decrypting the data using a templatefield tag posed another problem, extracting new values from the ‘Text Box1’ control.
Problem 2: When clicking the update button I handle the updating of the order in the Item Updating event but the Item Updated never fires and the Details View never change the mode to Read Only after the data was updated.
Details View control always stayed on the Edit Mode.