Blog

Select Insert Update And Delete(CRUD) With ASP.NET MVC4 -Razor on SAME VIEW

Posted by Deepika Chaudhary Blogs | ASP.NET MVC with C# Nov 29, 2012
This sample allows to perform the basic CRUD functionality on same page using mvc with razor engine with the help of jquery and partial views.
Download Files: SampleEmployee.rar
In this article we will learn how to perform CRUD operations in an ASP.Net MVC application for same view.

I have used the oracle db on this sample. You can  use sqlserver also.

You can create table TB_Employee with three fields.
FNAME,LNAME,EMPID


I had created three partialview in this sample application.
Add,Edit and List under views\home folder.
And there is one view Index.cshtml where i have called the List.cshtml(PartialView).

There are four model each for insert,update,delete and list.

Using jquery and css i have implemented this sample code.
Please give proper reference for jquery and scripts on List.cshtml to make this sample work on your local machine.


Thanks,
Deepika chaudhary
post comment
     
COMMENT USING
PREMIUM SPONSORS
DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and add new content to existing PDF documents from within your applications.
Get Career Advice from Experts
SPONSORED BY
  • PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.
Join a Chapter