Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
7
Reply
file upload using mvc
Dipika
Feb 28 2017 6:02 AM
190
Reply
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
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
7
)
Next Recommended Forum
How to declare if yopu don't know the element ammount?
Get Selected Menu Id of Context Menu Javascript