Click here to Skip to main content
16,004,854 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
How to upload multiple files and save database in asp.net
Posted

 
Share this answer
 
v2
Comments
honey4bee 8-Mar-11 1:32am    
i am saving file one by one, i want to save multiple files at a time,
how i can do this?
thatraja 8-Mar-11 1:46am    
Check my updated answer
Hope this[^]also might help you.
 
Share this answer
 
C#
protected void button_upload_image(object sender, EventArgs e)
   {
      if (FileUpload1.PostedFile.ContentLength != 0)
      {
          string path = Server.MapPath(@"images\");
          path = path + "hemant.jpg";
          FileUpload1.SaveAs(path);
       }
   }


you can use above code to upload file on server then you can save its url into database.
for multiple files you can use multiple fileupload control.


Thank you
Upload Image with resize[^]
 
Share this answer
 
v3

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