Multiple Image Upload
Multiple Image Upload In Button Click Using For Loop In Asp.Net C#.
http://dotnetdrizzles.blogspot.in/2016/01/multiple-files-or-image-upload-in.html
Html Coding For All Controls
Next - Create Images Folders - Add Coding to For Loop
Next - Run[F5] the Program - Upload Multiple Images
Multiple Image Upload In Button Click Using For Loop In Asp.Net C#.
http://dotnetdrizzles.blogspot.in/2016/01/multiple-files-or-image-upload-in.html
Multiple Image Upload
Image Update in Gridview
Show Image Preview
Restrict Upload File Size
Image Insert Bind GridView
Without Database Upload Image Show
Download Coding
Download
Image Update in Gridview
Show Image Preview
Restrict Upload File Size
Image Insert Bind GridView
Without Database Upload Image Show
Download Coding
Download
DEMO
HTML Coding
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:FileUpload ID="FileUpload1" runat="server" AllowMultiple="True" />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Upload" />
<asp:Label ID="lblMessage" runat="server" ForeColor="#FF3300" Text="Label"></asp:Label>
</div>
</form>
</body>
</html>
C# Coding
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
public partial class ImageMultipleUpload : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
HttpFileCollection imageCollection = Request.Files;
for (int i = 0; i < imageCollection.Count; i++)
{
HttpPostedFile uploadImages = imageCollection[i];
string fileName = Path.GetFileName(uploadImages.FileName);
uploadImages.SaveAs(Server.MapPath("~/images/") + fileName);
lblMessage.Text = "Images Uploaded";
}
}
}
First Create New Web Form - Add FileUpload &
Buttton & Label Controls
FileUploadControl - AllowMultiple=True.
Html Coding For All Controls
Next - Create Images Folders - Add Coding to For Loop
Next - Run[F5] the Program - Upload Multiple Images