Click here to Skip to main content
15,903,012 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

Can anyone tell me,Uploading multiple images with one browse button in with code....I seen so many blogs,but i didn't find using with one browse button..

Share this answer
Use this in your aspx file:

<asp:fileupload id="file1Uploader" runat="server" allowmultiple="true" />
<asp:button id="testUpload" runat="server" text="Click" onclick="testUpload_Click" xmlns:asp="#unknown" />

Then write this in your .cs file, for testUpload Click event:

string path=Server.MapPath( "~/UploadFile/");
foreach (HttpPostedFile file in file1Uploader.PostedFiles)
string path1=path+file.FileName;
Share this answer
Dixit Ashish 30-Apr-13 13:29pm    
can u please send me any demo...plz

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900