when i post using ajax, i can pass info into the data parameter which can be a json string. Is there anyway to pass the same json string but without jquery and ajax to an asp.net-mvc controller action?
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.
EDIT:
If you need to POST information back to the controller method, then I believe the only way to do this without jQuery or AJAX is using a
<form>.You could restyle the submit button as a link or something similar or even use jQuery to have some other event trigger the submit, but it wouldn’t an AJAX request.
Assuming your returning the correct FileContentResult syntax/content then the browser should handle the download correctly.
HTH
I’m assuming you are wanting to test your AJAX method without jQuery?
You can use Fiddler to call your MVC action with either GET or POST with any payload you wish.