Click here to Skip to main content
13,092,310 members (58,575 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hii to all,
I have successfully inserted data in to a table present in a SqlServer from front end using MVC3 & Entity Framework,now how can i update my table? can i update with the same View which i have created for inserting the records?if yes how can i use one more button i.e for Update in the same View,or else i need to create one more view please help me with code.Please guide me the above requirement by using some LINQ Query which will be more helpfull to me..

My table Consist of 5 Columns (Empid, Ename, Designation, Salary, DeptNo)

Posted 8-May-13 1:53am
Updated 8-May-13 2:16am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

To be short, your question topics are not related: you (should) update in the controller via the model, and not from the view - but you can call (theoretically) any controller action from any view, and there is the ajax version too.
So, as I see, you have some gaps in your knowledge. I suggest you go trough a tutorial like this:[^] and one about Entity Framework data manipulation:[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.170813.1 | Last Updated 8 May 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100