开发者

How do you get input type of file to auto post back on selection in ASP.NET

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜