nocilah
Banned
hi... i know nothing about asp.net.
I am trying to create a simple upload page. now i have managed to create an html version, but what i want is to create a flash version using the new command in flash 8 (import flash.net.FileReference) which allows you to popup a browse for file window.
from flash I then point to my aspx file but with little results and i believe the probelm is on the aspx side.
what i would like to know is if anyone can see anything wrong with the following code:
EDIT: Google is yeilding very little responses
i have got tonnes of php examples, but i only use .net framework.
I am trying to create a simple upload page. now i have managed to create an html version, but what i want is to create a flash version using the new command in flash 8 (import flash.net.FileReference) which allows you to popup a browse for file window.
from flash I then point to my aspx file but with little results and i believe the probelm is on the aspx side.
what i would like to know is if anyone can see anything wrong with the following code:
Code:
<script language="C#" runat="server">
string saveToFolder = 'c:\myserverpathhere'
private void Page_Load(object sender, System.EventArgs e)
{
HttpFileCollection uploadedFiles = Request.Files;
string Path = Server.MapPath(saveToFolder);
for(int i = 0 ; i < uploadedFiles.Count ; i++)
{
HttpPostedFile F = uploadedFiles[i];
if(uploadedFiles[i] != null && F.ContentLength > 0)
{
string newName = F.FileName.Substring(F.FileName.LastIndexOf("\\") + 1);
F.SaveAs(Path + "/" + newName);
}
}
}
EDIT: Google is yeilding very little responses
Last edited: