views:

50

answers:

3

Hi all,

I need to upload image or file when user selects that file like in gmail attach file without any other asp:button . What I mean is there shouldn't be any other button except fileupload control. And when a file is selected the file will be uploaded to the server folder.

How to implement that?

Please help.

A: 

That is done using JavaScript/AJAX. You can't do it only with ASP.NET controls.

Ralph Stevens
A: 

Take a HTML control and use the "onchange" event of this control. Make a asp code file and write the file's upload code on that file. Now use Ajax and to send request to asp's code file.

When you will select file it will automatically upload by ajax. Because Html control events doesn't use server side.

Deepak
A: 

Take a wee peek at this. Jquery + flash solution.

http://www.uploadify.com/demo/

Paul

related questions