在同一个MVC视图中编辑,保存,删除 [英] Edit, Save, Delete in the same MVC View

查看:67
本文介绍了在同一个MVC视图中编辑,保存,删除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我想添加,编辑,删除要在MVC 4.0中的相同视图中完成的事情。

< br $> b $ b



我可以使用不同的Action方法和View来做到这一点,但我想在同一视图中执行此操作。

请建议我。





提前致谢

解决方案

当您单击编辑,保存和删除按钮时,您可以使用PartialView,您的操作方法将返回相应的部分视图。



如何使用PratialView?请访问以下链接:



使用部分视图的CRUD操作和ASP.NET MVC4中的jQueryUI - 第2部分 [ ^ ]



在ASP.NET MVC 4中使用视图中的多个模型/ MVC 5 [ ^ ]


参考



CRUD的操作,使用,jQuery- dialog-and-Entity-Framework --- MVC-Razor [ ^ ]

http://www.c-sharpcorner.com/UploadFile/1492b1/complete-end-to-end-crud-operations-using-knockout-js-and-en/



http://www.c-sharpcorner.com/UploadFile/cd7c2e/implement-insert-update-and-delete-functionality/ [ ^ ]


Hi,

I would like to Add,Edit, Delete things to be done in Same View in MVC 4.0.



I am able to do this using different Action methods and View, but i want to do this in same view.
Please suggest me.


Thanks in advance

解决方案

You can use PartialView when you click on Edit, Save and Delete button your action method will return a correspond partialview.

How to use PratialView? visit below links:

CRUD Operations using Partial View and jQueryUI in ASP.NET MVC4 - Part 2[^]

Using Multiple Models in a View in ASP.NET MVC 4 / MVC 5[^]


Refer

CRUD-Operations-using-jQuery-dialog-and-Entity-Framework---MVC-Razor[^]


http://www.c-sharpcorner.com/UploadFile/1492b1/complete-end-to-end-crud-operations-using-knockout-js-and-en/

http://www.c-sharpcorner.com/UploadFile/cd7c2e/implement-insert-update-and-delete-functionality/[^]


这篇关于在同一个MVC视图中编辑,保存,删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆