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;
}
}
I am utilizing ASP.net MVC 3. This code represents an ajax/javascript method within my view.
In terms of syntax correctness, is there anything wrong with it as far as you can tell?
The value for familyMemberId
will be variable, while the userId
will remain constant.
I aim to pass the userId
from my viewModel to this ajax call, what is the best way to achieve this?