views:

8

answers:

0

Hello I'm using ASP.NET C# 2.0. So I'm find Uploadify in Stackoverflow... Then I'must control my uploading folder for some past posted ID's. At the end if a file(s) uploadded i must send them with mail attachment...

I can't figure that in every posts they're using ashx file type. But as i said. I'm not Upload My files basicly i must control them when uploading and after uploaded...

for Ex.

ublic string ControlDirectory()
{
    string DirectoryName = string.Empty;
    LinksColl oLinksColl = LinksMgr.YKS_GetLinkByLinkID(LinkID);
    DatabaseTablesList SubDirName = DatabaseTablesMgr.GetByID(oLinksColl[0].NotesDatabasePropetiesID);

    if (!Directory.Exists(FolderPath + "/" + SubDirName[0].DatabaseTableName))
        Directory.CreateDirectory(SubDirName[0].DatabaseTableName);

    DirectoryName = FolderPath + "/" + SubDirName[0].DatabaseTableName;
    return DirectoryName;
}

....

At the other hand i have tried

 public void ProcessRequest(HttpContext context)
{
    try
    {
        HttpPostedFile file = context.Request.Files["Filedata"];

        int id = (Int32.Parse(context.Request["id"]));
        string foo = context.Request["foo"];
        file.SaveAs("C:\\" + id.ToString() + foo + file.FileName);

        context.Response.Write("1");
    }
    catch (Exception ex)
    {
        context.Response.Write("0");
    }
}

in

public partial class Notes : YKSBasePage

but i have get error...

Could anyone have suggestion about that...