Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: MVC3
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)
 
Thanks
Ramu
Posted 8-May-13 2:53am
Edited 8-May-13 3:16am
vijay__p4.7K
v2

1 solution

Rate this: bad
good
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: http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc[^] and one about Entity Framework data manipulation: http://www.dotnetcurry.com/ShowArticle.aspx?ID=619[^]
  Permalink  
v2

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

  Print Answers RSS
0 OriginalGriff 5,130
1 DamithSL 4,237
2 Maciej Los 3,700
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,846


Advertise | Privacy | Mobile
Web01 | 2.8.141216.1 | Last Updated 8 May 2013
Copyright © CodeProject, 1999-2014
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