How can we add multiple images uploade in asp.net

  ASP.NET   Thursday, May 7, 2015   4030 | No Comments Yet!!! | No Download | No Demo | Hema Mehra
 Tags: multiple images ouload 


 Dim Httpfilcolltn As HttpFileCollection = Request.Files
                If Httpfilcolltn.Count <= 10 Then
                    For i = 0 To Httpfilcolltn.Count - 1

                        Dim Httpfilepostd As HttpPostedFile = Httpfilcolltn(i)

                        If Httpfilepostd.ContentLength > 0 Then

                            Imagefile = imagesSno + "_" + Httpfilepostd.FileName

                            If Directory.Exists(Server.MapPath("Traiff_pdfs/LocationImages/")) Then
                                Httpfilepostd.SaveAs(Server.MapPath("Traiff_pdfs/LocationImages/" + Imagefile))
                            Else
                                Directory.CreateDirectory(Server.MapPath("Traiff_pdfs/LocationImages/"))
                                Httpfilepostd.SaveAs(Server.MapPath("Traiff_pdfs/LocationImages/" + Imagefile))
                            End If
                            ImagetenpNM = Imagefile
                            Imagefile += Imagefile & "," & ImagetenpNM

                        End If
                    Next
                    lb_msg.Text = Httpfilcolltn.Count & "Files Uploaded Sucessfully"

Post Comments

if you have some suggestion, question, request on How can we add multiple images uploade in asp.net.

Please use the comment box to express your views.

 

Comments: