function ResendEmailInvite(internalUserId, familyMemberId) {
theinternalUserId = internalUserId;
theFamilyMemberId = familyMemberId;
if(confirm('Are you sure you want to resend this family member's invite?')){
$.ajax({
type: "POST",
url:"/Admin/ResendFamilyMemberEmail",
data: {internalUserId : theinternalUserId, familyMemberId : theFamilyMemberId},
success: function(response){
alert(response);
},
error: function(){
alert("Error");
}
});
return false;
}
}
我正在使用 ASP.net MVC 3。在我看来,这是一个ajax/javascript方法。
就语法而言,这是正确的吗?
将familyMemberId
是动态的,然而,userId
不是。我想将userId
我的 viewModel 传递给这个 ajax 调用,我该怎么做?