|
CS:
HttpFileCollection files = HttpContext.Current.Request.Files;
try
{
for (int iFile = 0; iFile <files.Count; iFile ++)
{
HttpPostedFile postedFile = files [iFile];
string fileName, fileExtension;
fileName = System.IO.Path.GetFileName (postedFile.FileName);
...
}
}
ASPS:
<INPUT id = "upfile" type = "file" name = "File" runat = "server">
This is the user control
But when I add multiple user controls to my page, the above code will also upload upload controls for other user controls.
How can i change
HttpFileCollection files = HttpContext.Current.Request.Files;
Cheng will only get the current user control instead of the "file" control for the entire page |
|