Hi
How to create multiple files upload using Bootstrap in Asp.net c#
Thanks
Hi
How to create multiple files upload using Bootstrap in Asp.net c#
Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Tahir AnsariRank #366 · 6.8K reputationPosted Sep 2, 2024, 12:40 PM EDT
Hi Ramco,
You can follow the steps to implement
Create the Web Form
Add a new Web Form to your ASP.NET Web Forms application (e.g., UploadFiles.aspx).
Add Bootstrap and Form Controls
In UploadFiles.aspx
Handle the File Upload in Code-Behind
in UploadFiles.aspx.cs implement the logic
using System; using System.IO; using System.Web; namespace YourNamespace { public partial class UploadFiles : System.Web.UI.Page { protected void UploadButton_Click(object sender, EventArgs e) { if (FileUpload1.HasFiles) { foreach (HttpPostedFile uploadedFile in FileUpload1.PostedFiles) { if (uploadedFile != null && uploadedFile.ContentLength > 0) { string filePath = Path.Combine(Server.MapPath("~/uploads"), Path.GetFileName(uploadedFile.FileName)); uploadedFile.SaveAs(filePath); } } // Optionally, provide feedback to the user // e.g., Label1.Text = "Files uploaded successfully!"; } } } }Create Uploads Directory
Ensure you have an uploads directory in your web application’s root directory. If it doesn’t exist, create it:
Right-click on your project in Solution Explorer
Choose "Add" > "New Folder"
Name it uploads
Update Web.config for File Upload Limits