I have an ASP.NET Webform and inside the form I have an i开发者_如何学编程nput type of file. What I would like to happen is for the form to post immediately after the user chooses a file.
I have a server side function I would like to be called, let's say UploadedFile()
What is the easiest way to accomplish this?
If you are using jQuery you can do it like this: http://www.bitsandpix.com/entry/jquery-file-upload-auto-submit-using-jqueryparentsexp/
Edit:
That of course only addresses the submit part. You should probably be using a FileUpload
control instead of an input type=file
in order to wire up the correct server side event.
精彩评论