I am trying to do some jquery.post where I pass back the Model. I been searching google but can’t really find a detail example of $.post with data that passes back Model.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Assuming you have a strongly typed view with a model you could use the $.ajax method to send your entire model to the server using a JSON AJAX request:
and the corresponding controller action to which we send the POST request: