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.

Is that the correct path to where the file is being saved to?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.