0

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).

7
  • Actually I want to upload a file with ajax and don't understand how to do this with ajax. Do you have any idea. Commented Jan 26, 2013 at 12:17
  • give me the answer instead voting down. What is this? Commented Jan 26, 2013 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. Commented Jan 26, 2013 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. Commented Jan 26, 2013 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 Commented Jan 26, 2013 at 13:04

3 Answers 3

1

Found same question

Javascript isn't uploading binary data

Sign up to request clarification or add additional context in comments.

9 Comments

I mean file data in form... I want the binary data of file that has to be uploaded..
Yes this is already open on in my browser but this is specific to moz only.
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.
No, I did not vote down your question. I'm here to share what I have learn
|
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.

5 Comments

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?
Retrieves it in the sense? Sorry do you want to understand whether it is scalable across other projects or something like that?
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?
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 codeproject.com/Articles/1757/File-Upload-with-ASP-NET
Hi, I have used this in my project once evolpin.wordpress.com/2011/09/11/… .There are several other tutorials based on this. Hope this helps
0

Maybe Uploadify is your friend here... have a read of this for more info http://markp3rry.wordpress.com/?s=uploadify&submit=Search

2 Comments

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.
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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.