Link to home
Start Free TrialLog in
Avatar of adworldmedia
adworldmediaFlag for United States of America

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?
Avatar of leakim971
leakim971
Flag of Guadeloupe image

You cannot use JSON to send files

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
ASKER CERTIFIED SOLUTION
Avatar of adworldmedia
adworldmedia
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of adworldmedia

ASKER

The other solution didn't help, and I figured out how to do it on my own.