views:

460

answers:

1

Hi,

I have a FormView control which uses the DataSource control for binding. It has the Item Template and therefore automatically displays the New, Edit , Delete buttons which then pick the appropriate queries from the DataSource control queries.

If i had to do the mapping of the New, Edit and Delete buttons of the FormView control from the code behind, what is the approach ?

Thanks.

A: 

The most important thing here is not to forget to pass the CommandName as the operation you want to perform i.e. Insert, Update, Delete .... This will trigger the FormView's event to perform such operation.

Have a look at here and here.

afgallo