Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to post form data in ajax call. Need to send data from one viewmodel to another in MVC.Please Suggest
Posted
Updated 28-Jan-15 23:07pm
v2
Comments
Sinisa Hajnal 29-Jan-15 5:06am    
Google. There, suggested. What have you tried?
Mano1822 29-Jan-15 5:19am    
you can use Ajax.BeginForm()
or
JQuery POST method

1 solution

//Use this code:

$.ajax({
url: "controller/actionmethod",
type: "post",
data: { propertyName: value},
datatype: "json",
success: function (data) {
}
});

(or)

@using (Ajax.BeginForm("TestAjaxRedirect", "Home", FormMethod.Post, null))
{
<input type="submit" value="Ajax PsBk Click" />
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900