0

Hi,

I stored a file in the folder taht selected using file upload control.

When I tried to view this content from that folder I got an error like this.

Cannot find the C:\Documents and settings\Terapc\LocalSettings\temporary Internet Files\Content.IE5\6AJ9DNHZ\name.txt file

Do you want to create a new file?

The code I used to view this file is:

if (file.Exists) 
{

Response.Clear();

Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name); 
Response.AddHeader("Content-Length", file.Length.ToString());

Response.ContentType = "application/octet-stream"; 
Response.WriteFile(file.FullName);

Response.End();

}

else

{

MsgBox1.alert("The file does not exist"); 
}

Hope you can help me.

Thanks in advance.

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by nhauck
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.