Author: UjjwalMeshram | Posted on: 10/13/2008 3:09:36 AM | Views : 359

hi all

I m trying to upload a file. For this i m using fileupload control "InputFile1"
i m using vs2005

The code look like below

if (IsValid && InputFile1.HasFile)
{
if (InputFile1.FileContent.Length 0)
{
try
{
string filename = InputFile1.FileName;
string fileextension = Path.GetExtension(filename);
InputFile1.MoveTo(Path.Combine(apppath, "video\\org_video\\" + InputFile1.FileName), MoveToOptions.Overwrite);
}
catch (Exception ex)
{
Response.Write(ex.Message );
}

}
else
{
Label2 .Text =" the file is above 50 Mb";
}
}

when i run this code i m getting error "The process cannot access the file 'C:\Documents and Setti ...

Go to the complete details ...