Click here to Skip to main content
15,880,543 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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)

Thanks
Ramu
Posted
Updated 8-May-13 2:16am
v2

1 solution

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[^]
 
Share this answer
 
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900