问题描述
Hi
如何在一次ajax调用中调用两个actionresult方法..?
在
Hi How to call two actionresult method in one ajax call..?
In
$('#st-btn')
按钮单击我正在调用show1ActionResult方法
同时我想再调用一个Actionresult方法(即) show2 同样的电话..
在我的第二个ActionResult中,我想检查是否检查了checkbutton?
如果选中,我想在我的成功中更新bool值..
任何建议会有帮助吗?
我尝试过的事情:
button click i'm calling "show1" ActionResult Method
Meanwhile i want to call one more Actionresult method (i.e) show2 in the same call..
In my second ActionResult i want to check whether checkbutton is checked are not?
If checked i want to update the bool value in my success..
Any suggestion would be helpful?
What I have tried:
<pre> $('#st-btn').on('click', function (e) {
e.preventDefault();
var _data = {
VModel: (@Html.Raw(Json.Encode(Model))),
IValue: $("#txt1").val(),
N: 'justin'
}
$.ajax({
type: 'POST',
dataType: "json",
contentType: 'application/json; charset=utf-8',
url: "@Url.Action("show1")",
async: false,
data: JSON.stringify(_data),
success: function (data) {}
推荐答案
按钮单击我正在调用show1ActionResult方法
同时我想再调用一次Actionresult方法(即) show2 打电话..
在我的第二个ActionResult中,我想检查是否检查了checkbutton?
如果选中,我想在我的成功中更新bool值..
任何建议都会有所帮助吗?
我尝试了什么:
button click i'm calling "show1" ActionResult Method
Meanwhile i want to call one more Actionresult method (i.e) show2 in the same call..
In my second ActionResult i want to check whether checkbutton is checked are not?
If checked i want to update the bool value in my success..
Any suggestion would be helpful?
What I have tried:
<pre>
这篇关于如何在1个ajax调用中调用2个actionresult方法。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!