asp.net - Enable users to upload files to folder using javascript -


I am running Windows Server 2012, IIS 8 and ASP.NET 4.5. Please be patient with me because I am new to both IIS and ASP.Net.

I am trying to create a site where users can upload multiple files that are placed in the hosted folder on the web server. . When a user clicks on the "Upload" button, I want to refresh that page and see the message "Your file was successfully uploaded".

upload.aspx

  & lt; Html & gt; & Lt; Top & gt; & Lt; Script language = "javascript" & gt; Validate the function () {// does some verification material doUpload (); } Function doUpload () {document.upload.todo.value = "upload"; Document.upload.submit (); // Display Message} & lt; / Script & gt; & Lt; / Head & gt; & Lt; P name = "message" style = "display: hidden" & gt; File uploaded successfully. & Lt; / P & gt; & Lt; Form method = "post" action = "upload.aspx" name = "upload" enctype = "multipart / form-data" & gt; & Lt; Input type = "file" name = "uploadFile1" & gt; & Lt; Input type = "file" name = "uploadFile2" & gt; & Lt; Input type = "file" name = "uploadFile3" & gt; ... & lt; Input type = "button" name = "submit" value = "upload" onClick = "return valid ()" & gt; & Lt; / Form & gt; & Lt; / Html & gt;  

The code does not contain files in a folder yet, and I'm not sure how to specify it, any help would be welcome!

You are going to struggle to do this with client-side scripts.

This MSDN article tells ASP.NET FileUpload control, read one -


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -