joker77 Posted November 28, 2007 Posted November 28, 2007 Hi I'm experiencing different behaviour on different machines (all using IE6), and just wondering if anyone has any thoughts as to what the problem is. I have a form that views a file. An ID is passed to the form, which does a lookup to the database and gets the file to open. It then checks which type of file it is, and uses the Response object to present the file to the User. A sample of the code used is: strFile = GetFile(id) strType= LCase(Right(strFileName, Len(strFileName) - InStr(strFileName, ".", CompareMethod.Text))) If strType= "doc" Then Response.ContentType = "application/ms-word" ElseIf strType= "jpg" Or strType= "jpeg" Or strType= "bmp" Then Response.ContentType = "image/JPEG" Else Response.ContentType = "text/plain" End If Response.AddHeader("content-disposition", "inline;filename=" & strFileName) Response.BinaryWrite(myReader.Item("binData")) The problem is that on some machines, the doc opens up as the .aspx file itself, on other machines it opens the word document. (Word is installed on all machines, and other web pages that have attachments have no such problems). The jpeg files ALWAYS open up ok. Quote What if the Hokey-Pokey IS what it's all about?
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.