I am running Windows Server 2012, IIS 8, and ASP.NET 4.5. Please be patient with me as I am new to both IIS and ASP.NET.
I am trying to build a site where users are able to upload multiple files which are placed into a folder hosted on the web server. When the user clicks the "Upload" button, I want that page to refresh and a message "Your file is successfully uploaded" is displayed.
Here is some code/pseudocode:
upload.aspx
<html>
<head>
<script language="Javascript">
function validate()
{
//does some validation stuff
doUpload();
}
function doUpload()
{
document.upload.todo.value="upload";
document.upload.submit();
//display message
}
</script>
</head>
<p name="message" style="display:hidden">File successfully uploaded.</p>
<form method="post" action="upload.aspx" name="upload" enctype="multipart/form-data">
<input type="file" name="uploadFile1">
<input type="file" name="uploadFile2">
<input type="file" name="uploadFile3">
...
<input type="button" name="Submit" value="Upload" onClick="return validate()">
</form>
</html>
The code does not place the files into a folder yet and I am not sure how to go about specifying that. Any help would be greatly appreciated!