views:

37

answers:

1

I have an ASP.NET Webform and inside the form I have an input 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?

+1  A: 

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.

klausbyskov