Updating multiple records asp

Posted by / 26-May-2017 16:15

NET MVC we can easily edit a single record handled by the default model binding.It may be possible that you need to edit multiple records.In that context, multiple model objects are being submitted to the action method.The single record editing works on the assumption that form field names from the view match the corresponding model property names.Doing this one record at a time is a killer on productivity.However, using checkboxes and a drop-down list, one can select a large group of records and then define a DMX Command to update the records in one fell swoop.However when multiple model objects are submitted this assumption is no longer true.

There may be instances where one wants to update a field value for a large, select group of records.

So, let's start with the following sections: Creating MVC Application In this section we'll create the MVC application using Visual Studio 2013 using the following procedure: Step 1: Open Visual Studio 2013 and click on "New Project". NET Web Application" and enter the name as in the following: Step 3: Select the "MVC" project template as in the following: Visual Studio automatically creates the MVC application using MVC 5 and adds files and folders to the project.

Adding Model In this section we'll add a model for the application.

To perform the following task we need to create a table in SQL Server as like this.

Insert some records in the table where you'll not specify the cost price and sellprice of the product; just specify the productname value. For the first time when you run this application you will see the following.

updating multiple records asp-9updating multiple records asp-74updating multiple records asp-81

One thought on “updating multiple records asp”