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.
Above the Validation Summary, add: The new link will appear at the top of the content for the Students page. You will render the fields for adding a new student by using a Dynamic Entity control.
The Grid View control does not include the Insert Method property and therefore cannot be used for adding a new record with model binding.
You can find the Insert Method property in the Form View, Details View, or List View controls.
The First Name and Last Name properties are both required.
First Name cannot exceed 20 characters in length, and Last Name cannot exceed 40 characters.
The Year property is an enumeration value, and the dynamic data template for an enumeration value specifies a drop down list for editing.
You can find that template by opening the Enumeration_file in the Dynamic Data/Field Templates folder.
You can easily integrate pre-built dynamic data templates into your existing site by installing a Nu Get package.
From the Manage Nu Get Packages, install the Dynamic Data Templates CS.
The Student ID property was marked with the [Scaffold Column(false)] attribute so it is not rendered. Click Insert and notice the new student has been created.
In the Main Content placeholder of the Add Student page, add the following code. In this tutorial, you enabled updating, deleting, and creating data.
If you provide valid values, the update completes successfully.