Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
send file as a parameter to ajax call
wassim safa
Feb 25 2016 2:26 AM
356
Reply
hi,
sending file to controller is null
here what i am doing:
i am trying to upload file to controller and then save it in sql table.
i am using : <td > <input type="file" id="DocumentContent" name="DocumentContent" /></td>
in view
and when click save i used this :
var row = { DocumentContent:document.getElementById('DocumentContent').files[0]}
and then send this row as parameter in ajax:
addrow: function (rowid, rowdata, position, commit) {
$.ajax({
url: urlAddDocument,
data: rowdata,
type: "Post",
success: function (data, status, xhr) {
// update command is executed.
flag = 1;
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
How to Convert Oracle 9i Database into Sql server 2008 r2
search data from table without send the request to db?