Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
3
Reply
ASP.NET MVC-Update existing and save new record excel upload
mike idowu
Dec 19 2017 3:37 AM
205
Reply
How do I update exiisting record using COUNTRY_CODE as the unique identifier and Save new record in excel batch upload using ASP.NET MVC.
I have this Model Class
public COUNTRIES()
{
public int COUNTRY_ID { get; set; }
public string COUNTRY_CODE { get; set; }
public string COUNTRY_NAME { get; set; }
}
See my excel sample
I want to perform batch upload of data from Excel with all the fields above and save into the database. I want the code to use the field
COUNTRY_CODE
as the
UniqueIdentifier
.
It will iterate through the Excel Sheet to check if COUNTRY_CODE exists in the database.
The application will save the one that are not in existence using COUNTRY_CODE
It will show the user the list of COUNTRY_CODE that exists in the database.
it will update the record where the
uniqueidentifier
exists.
The user will be able to select the ones he wants to update from the last.
Attachment:
Excelduplicate.zip
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
Microsoft Certification
Year Conversion