Below is my ajax call
How to send a file uploaded to action method in the following format only using ajax.
The parameter in the data file will not change.
$.ajax({
type: "Post",
url: '/Student/SaveApplication',
data: "mobilenumber=" + mobilenumber + ""a=" + quota + "&subjectList=" + subjectList,
datatype: 'json',
contentType: "multipart/form-data",
processData: false,
cache: false,
success: function (op) {
}
});
The action method will also be parameterized
public ActionResult SaveApplication(string subjectList,string mobilenumber,string quota)
{
//code to save data
}