我可以在Mvc中使用Post方法来显示视图 [英] Can I Use Post Method In Mvc To Show The View

查看:78
本文介绍了我可以在Mvc中使用Post方法来显示视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,



我想要你们的一些建议。实际上我已经开发了一个MVC应用程序,并且在该应用程序中我有多个菜单所以在菜单上单击我使用jQuery Ajax调用View Verb方法并显示它,所以有人可以建议我使用POST Verb方法使用Ajax加载视图是好还是应该总是GET方法以及它们在各方面之间会有多大差异?



先谢谢!!!!



谢谢

Raviranjan

Hi Friends,

I want some suggestions from you people. Actually i have developed one MVC application and in that application i am having multiple menu so on menu click i am calling View with POST Verb Method using jQuery Ajax and showing it, so can someone suggest me that using POST Verb method to load view using Ajax is good or should i always GET method and how much difference it will make between these two in all respect?

Thanks in Advance!!!!

Thanks
Raviranjan

推荐答案

这取决于您的目的和发送的数据量服务器。



例如,您绝对不希望通过GET请求发送数据blob,因为某些浏览器对GET有字符限制。再次,如果敏感数据说,登录凭证,你必须使用POST。



以下是关于它的好文章...可能会有帮助。< br $> b $ b

http://javascript.about.com /od/ajax/a/ajaxgp.htm [ ^ ]
It depends on your purpose and amount of data you are sending to server.

For example, you definitely don't want to send blobs of data through GET request because, some browser has character limits over GET. Again, in case of sensitive data say, login credentials, you must have to use POST.

Following is a good post about it... Might be helpful.

http://javascript.about.com/od/ajax/a/ajaxgp.htm[^]


您好,



感谢您的快速回复。实际上,我不必发送任何数据,只是我必须使用Ajax调用加载视图,所以我认为POST会比GET稍好一些。



谢谢

Raviranjan
Hi,

Thanks for your quick reply. Actually, i don't have to send any data, just i have to load the view using Ajax call so i was thinking POST will be somewhat better than GET.

Thanks
Raviranjan


这篇关于我可以在Mvc中使用Post方法来显示视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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