Tutorial :Binding a DataTable to a FormsView control in ASP.NET


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 ?



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.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »