开发者

ASP.NET MVC Ajax - AjaxOptions.HttpMethod default is GET, not POST - wrong docs?

开发者 https://www.devze.com 2023-03-10 19:32 出处:网络
When calling Ajax.ActionLink开发者_StackOverflow中文版 and passing a new instance of AjaxOptions, HttpMethod is by default GET, not POST as stated by the documentation. Is the documentation wrong or d

When calling Ajax.ActionLink开发者_StackOverflow中文版 and passing a new instance of AjaxOptions, HttpMethod is by default GET, not POST as stated by the documentation. Is the documentation wrong or does ActionLink modify the AjaxOptions structure somehow by checking whether the property had been set by the user? I don't see why it would.

http://msdn.microsoft.com/en-us/library/system.web.mvc.ajax.ajaxoptions.httpmethod.aspx


Apparently the default is actually empty string (according to Reflector) and the classes that use it treat "" as GET. So the default is GET, the docs are wrong.

0

精彩评论

暂无评论...
验证码 换一张
取 消