adworldmedia
asked on
Access Asp:FileUpload from Javascript/Jquery
I'm currently using a bootstrap Wizard (https://github.com/amoffat/bootstrap-application-wizard) and I have an Asp:FileUpload control within it.
I need to use JQuery to parse the form data and pass it to a C# static WebMethod.. I've retrieved all the control values fine, but I am having trouble getting the File Upload data.
How can I pass the uploaded file's information to the WebMethod via Jquery or Javascript?
I need to use JQuery to parse the form data and pass it to a C# static WebMethod.. I've retrieved all the control values fine, but I am having trouble getting the File Upload data.
How can I pass the uploaded file's information to the WebMethod via Jquery or Javascript?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The other solution didn't help, and I figured out how to do it on my own.
If you are OK to go away JSON, you may use FormData to POST your data included your files.
Check here the example : https://developer.mozilla.org/en-US/docs/Web/Guide/Using_FormData_Objects