Hi Marty, I prepared a small sample where I demonstrates how to achieve only one opened Edit/Insert form at the same time. I have a Item Template and Edit Item Template in the Grid View, when click on Edit Button (on Item Template), then change to Update Button (on Edit Item Template).

net onupdating-73net onupdating-87net onupdating-75

protected void Entity_On Updating(object sender, Linq Data Source Update Event Args e) { My Class obj Entity = (My Class)e.

Is it possible to use a variable as an update parameter in asp.net?

I have the page number to be updated stored in a variable called 'mypagenum', how would I write an update parameter using that value.

event to perform additional initialization that is specific to your application, to validate the values of parameters, or to change the parameter values before the Object Data Source control performs the update operation.

The parameters are available as an IDictionary collection that is accessed by the The following three examples show a Web page, a code-behind page class, and a data-access class that enable a user to retrieve and update records in the Employees table in the Northwind database.

The first example shows a Web page that contains two Object Data Source controls, a Drop Down List control, and a Details View control.

The first Object Data Source control and the Drop Down List control are used to retrieve and display employee names from the database.

The second Object Data Source control and the Details View control are used to retrieve, display, and modify the data from the employee record that is selected by the user.

event handler deserializes the object in view state that contains the original data for the data record that is being updated.

The object that contains the original data is passed as a parameter to the Update method.

The original data must be passed to the database so that it can be used to check whether the data has been modified by another process.