|
I use JS to press the button to add the file domain
<script language = "JavaScript">
function addFile ()
{
var str = '<INPUT type = "file" size = "30" NAME = "File">' + "<br/>";
document.getElementById ('MyFile'). insertAdjacentHTML ("beforeEnd", str);
}
</ script>
But when uploading
HttpFileCollection files = Request.Files;
for (int i = 0; i <files.Count; i ++)
{
HttpPostedFile postedfile = files [i];
String filename = Path.GetFileName (postedfile.FileName);
postedfile.SaveAs (@ "D:\fileload\" + filename);
}
The files.count here is always equal to 0, but can it be uploaded normally without the motherboard? ? ? ?
Expert advice, is it related to the mother board? ? |
|