locked
UploadFile Control Not Allowing Multiple File Selection in IE 11 using visual studio 2010 RRS feed

  • Question

  • User-633260879 posted

    AllowMultiple="true" property is working in chrome but not in internet explorer 11. please suggest on how to resolve it. Have also added below line of code in page load event of the page : FileUpload1.Attributes("multiple") = "multiple" but still it doesn't work in internet explorer 11. Can you please suggest solution using visual studio 2010?

    Tuesday, January 14, 2020 5:54 AM

All replies

  • User288213138 posted

    Hi IonIT,

    AllowMultiple="true" property is working in chrome but not in internet explorer 11. please suggest on how to resolve it. Have also added below line of code in page load event of the page : FileUpload1.Attributes("multiple") = "multiple" but still it doesn't work in internet explorer 11. Can you please suggest solution using visual studio 2010?

    I tested the AllowMultiple="true" property in IE11, it works fine.

    The code:

    <asp:FileUpload ID="FileUpload1" runat="server" AllowMultiple="true" />
                <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
                <asp:Label ID="Label1" runat="server"></asp:Label>
    
    protected void Button1_Click(object sender, EventArgs e)
            {
                foreach (HttpPostedFile postedFile in FileUpload1.PostedFiles)
                {
                    string fileName = Path.GetFileName(postedFile.FileName);
                }
                Label1.Text = string.Format("{0} files have been uploaded successfully.", FileUpload1.PostedFiles.Count);
            }

    The result:

    As far as i know, ASP.Net versions 2.0, 3.0, 3.5 and 4.0 does not support AllowMultiple feature. AllowMultiple is only available in 4.5.

    Best regards,

    Sam

    Tuesday, January 14, 2020 8:20 AM
  • User-633260879 posted

    Thanks for the quick response. But as I said I am using visual studio 2010. If allowmultiple ="True" is not going to work in visual studio 2010, then what will be the alternative for the same.

    I have to use visual studio 2010 only. How can I create multiple file upload facility in visual studio 2010? Kindly help me with this.

    Tuesday, January 14, 2020 11:56 AM
  • User475983607 posted

    Thanks for the quick response. But as I said I am using visual studio 2010. If allowmultiple ="True" is not going to work in visual studio 2010, then what will be the alternative for the same.

    I have to use visual studio 2010 only. How can I create multiple file upload facility in visual studio 2010? Kindly help me with this.

    Visual Studio is an editor and has nothing to do with the browser's ability to upload a file unless there is a bug in the code.  Share code that reproduces this issue if you need community debugging support.

    Make sure IE is not in compatibility or enterprise mode as that can also affect file upload.

    https://support.microsoft.com/en-us/help/17472/windows-internet-explorer-11-fix-site-display-problems-compatibility-v

    https://forums.asp.net/t/2113127.aspx?How+to+Upload+multiple+files+in+IE+Internate+Explorer+Enterprise+Mode+using+C+and+ASP+NET

    Tuesday, January 14, 2020 3:27 PM