<% @Page Language="C#" Debug="true" %>
<%
string extName = "";
foreach (string filename in Request.Files)
{
//Response.Write(Request.Files + "," + Request.Files.Count + "," + Request.Files.Get(filename) + "\n");
//Response.End();
HttpPostedFile file = Request.Files.Get(filename);
string fileName = System.IO.Path.GetFileName(file.FileName);
extName = fileName.Substring(fileName.LastIndexOf('.') + 1);
// IIS_IUSERS MUST have the write permission of the temp folder.
// Under configuration in web.config
//<system.web>
// <customErrors mode="Off" />
// <httpRuntime maxRequestLength="409600" />
//</system.web>
string path = System.IO.Path.Combine(Server.MapPath("~/temp/"), "temp." + extName);
file.SaveAs(path);
break;
}
Response.Write("./temp/temp." + extName);
%>
<%
string extName = "";
foreach (string filename in Request.Files)
{
//Response.Write(Request.Files + "," + Request.Files.Count + "," + Request.Files.Get(filename) + "\n");
//Response.End();
HttpPostedFile file = Request.Files.Get(filename);
string fileName = System.IO.Path.GetFileName(file.FileName);
extName = fileName.Substring(fileName.LastIndexOf('.') + 1);
// IIS_IUSERS MUST have the write permission of the temp folder.
// Under configuration in web.config
//<system.web>
// <customErrors mode="Off" />
// <httpRuntime maxRequestLength="409600" />
//</system.web>
string path = System.IO.Path.Combine(Server.MapPath("~/temp/"), "temp." + extName);
file.SaveAs(path);
break;
}
Response.Write("./temp/temp." + extName);
%>