I want to retrieve the file data in jquery and upload this to aspx page. I have read about the html5 way of doing this but want to know how to do this old browser(not supporting html5).
Asked
Active
Viewed 441 times
0
-
Actually I want to upload a file with ajax and don't understand how to do this with ajax. Do you have any idea. – azam Jan 26 '13 at 12:17
-
give me the answer instead voting down. What is this? – azam Jan 26 '13 at 12:32
-
user, I think the downvote means you need to elaborate on what you are trying to achieve, and what issue you are facing in an understandable way for people to help you. – Rohith Nair Jan 26 '13 at 12:42
-
Ok... This is nice info thanks... will take care next time.. It seems very rude when someone votes down without telling you what is wrong with the question. – azam Jan 26 '13 at 13:01
-
I also did not vote down :). But please read your question again, it took so much time to understand the question. If you could have edited it to just the point; this could have been much easier. "I want to retrieve the form data in javascript" but your actual question was to File upload in ASP.NET using AJAX – Rohith Nair Jan 26 '13 at 13:04
-
hhhh.... ok.. i have asked this question numerous times no one responded so though to give it a twist.. – azam Jan 26 '13 at 13:05
-
I can understand :) but the thing is you can find related posts very easily and this question has been asked so many times here. May be thats why people vote it down – Rohith Nair Jan 26 '13 at 13:07
3 Answers
1
Found same question
-
I mean file data in form... I want the binary data of file that has to be uploaded.. – azam Jan 26 '13 at 12:20
-
Yes this is already open on in my browser but this is specific to moz only. – azam Jan 26 '13 at 12:28
-
I found this same issue http://stackoverflow.com/questions/7529159/javascript-isnt-uploading-binary-data – catherine Jan 26 '13 at 12:36
-
edit the answer and mention the link up there so I shall mark it as answer. and please vote up. why people here vote down with out helping. – azam Jan 26 '13 at 12:48
-
No, I did not vote down your question. I'm here to share what I have learn – catherine Jan 26 '13 at 12:54
-
why you are angry on voting down? It's just a vote, you can vote up next time. And maybe someone didn't get what you want that's why he vote it down. – catherine Jan 26 '13 at 12:59
-
hh... When you are stuck with such minor issue and don't know how to resolve.. Then if someone votes down instead helping then a human can get angry.. We are not machines we do have feelings.. This is more like facebook discussion if you want join me there. – azam Jan 26 '13 at 13:10
-
When I have an issue to resolve I don't go here, I prefer to search and go to a site that has documentation. And if someone vote me down, I will not get angry. I will make my work improve to make that person satisfied. Your facebook id? – catherine Jan 26 '13 at 13:30
-
1
Do you just want to read through javascript or do you want to upload? Have a look at :https://stackoverflow.com/questions/5397991/html-4-equivalent-of-html-5s-filereader for accessing file data.
If it is just about posting file to server using ajax, then you can use jquery plugin (easy way) or write ajax request through javascript to post details.

Community
- 1
- 1

Rohith Nair
- 1,080
- 1
- 17
- 33
-
Yes my issue actually is to upload the file through ajax. but I am curious about the process too. Just to understand it for the future use.. and actually how the JQuery Api retrieves it? – azam Jan 26 '13 at 12:24
-
Retrieves it in the sense? Sorry do you want to understand whether it is scalable across other projects or something like that? – Rohith Nair Jan 26 '13 at 12:27
-
I mean how the data of the file is sent with ajax? Only html5 has a way to retrieve the binary of the file and send it with ajax request? However, how to retrieve the file binary data with javascript or jquery? – azam Jan 26 '13 at 12:31
-
I think I got confused. If you just want to create a form and receive file data to aspx page on submit click; I think this is a good starting point http://www.codeproject.com/Articles/1757/File-Upload-with-ASP-NET – Rohith Nair Jan 26 '13 at 12:40
-
Hi, I have used this in my project once http://evolpin.wordpress.com/2011/09/11/asp-net-ajax-file-upload-using-jquery-file-upload-plugin/ .There are several other tutorials based on this. Hope this helps – Rohith Nair Jan 26 '13 at 12:51
0
Maybe Uploadify is your friend here... have a read of this for more info http://markp3rry.wordpress.com/?s=uploadify&submit=Search

markp3rry
- 724
- 10
- 26
-
Thanks... Can you explain the internal working of how the file is sent via ajax request. I don't understand how the file is sent via ajax. – azam Jan 26 '13 at 20:02
-
You need to set something up on your server to process the file (could be a generic handler in .net or a php script). You make a jQuery ajax call as specified on the link I gave you and this passes the file data in a stream to the handler on the server. Uploadify does the async progress bar bit (and I had to render it in an iFrame to get it to work). – markp3rry Jan 26 '13 at 22:04