The Year property is an enumeration value, and the dynamic data template for an enumeration value specifies a drop down list for editing.
Run the web application, and update and delete any of the records.
Notice that when in the edit mode the value for the Year property is automatically rendered as a drop down list.
Finally, note that even with all these changes, the page itself has never been wholly reloaded—that page’s timestamp should remain the same.
Now, you might ask “Why bother setting up all these triggers?
Enabling users to update and delete records in the database is very similar to the process for retrieving data.
In the Update Method and Delete Method properties, you specify the names of the methods that perform those operations.With a Grid View control, you can also specify the automatic generation of edit and delete buttons.The following highlighted code shows the additions to the Grid View code.It uses the Visual Studio 2012 template, which is slightly different than the Visual Studio 2013 template shown in this tutorial.To provide the best user experience and minimize code repetition, you will use dynamic data templates.This tutorial shows how to create, update, and delete data with model binding.