Author: sbilbrey | Posted on: 1/13/2009 1:16:16 PM | Views : 266

 I have an aspx that contains an ascx. The ascx is a list of files that the user can click on to open. The code around this looks like:
         private void openAttachedFile(string fileName)
        {
            string appPath = ConfigurationManager.AppSettings["AttachmentPath"].ToString() + @"\" + fileName;
            FileStream fs = File.OpenRead(appPath);

            BinaryReader br = new BinaryReader(fs);

            Response.Clear();

            Response.ContentType = "application/octet-stream";
       &n ...

Go to the complete details ...