aspx til asp
Er er en der kan "oversætte" denne asp.net til asp?<%@ Page Language="C#" %>
<%@ Import Namespace="System.IO" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
// The EAFlashUpload control sends files in separate requests,
// so below code is executed for each file.
// define folders for files storing.
string UploadFolder = Server.MapPath("") + "\\UploadedFiles\\";
// check if file persits in the request and
// if above condition is true store file to UploadFolder location
if (Request.Files != null && Request.Files.Count > 0)
{
HttpPostedFile uploadedFile = Request.Files[0];
//Storing the file
uploadedFile.SaveAs(UploadFolder + Path.GetFileName(uploadedFile.FileName));
// The EAFlashUpload requires at least one symbol in the request
Response.Write("The file has been saved.");
}
else
{
Response.Write("The file has not been sent.");
}
}
</script>