|
|
|
![]() |
|
Strumenti |
![]() |
#1 |
Senior Member
Iscritto dal: Feb 2003
Messaggi: 2805
|
[ASP] Problema visualizzazione con firefox
Ho una pagina che mi visualizza una immagine presente in un database.
Con IE è tutto perfetto, con firefox, invece di vedere l'immagine, mi fa vedere il binary presente nel DB. Vi riporto qui sotto il codice che genera la visualizzazione della foto. Sapete dirmi come correggere tale problema???? Ciao e grazieeeeeeee ------------------------------------------- <% Response.expires = 0 Response.expiresabsolute = Now() - 1 Response.addHeader "pragma", "no-cache" Response.addHeader "cache-control", "private" Response.CacheControl = "no-cache" %> <!--#include file="db.asp"--> <!--#include file="aspmkrfn.asp"--> <% Response.Buffer = True ' Get key sKey = Request.QueryString("key") If sKey = "" Or IsNull(sKey) Then Response.Redirect "Detailslist.asp" Response.End End If ' Open Connection to the database Set conn = Server.CreateObject("ADODB.Connection") conn.Open xDb_Conn_Str sKeyWrk = "" & AdjustSql(sKey) & "" sSql = "SELECT * FROM [Details]" sSql = sSql & " WHERE [ID] = " & sKeyWrk Set rs = Server.CreateObject("ADODB.Recordset") rs.Open sSql, conn If Not rs.Eof Then 'rs.MoveFirst Response.BinaryWrite rs("Photo") End If rs.Close Set rs = Nothing conn.Close Set conn = Nothing %>
__________________
AMD 3700x --- ASUS X570 CROSSHEAR VIII HERO --- 4x 8GB Corsair Vengeance RGB PRO 3600 MHz --- SSD: Samsung 980Pro 1TBb --- EVGA RTX 2070 SUPER |
![]() |
![]() |
![]() |
#2 |
Senior Member
Iscritto dal: Apr 2000
Città: Vicino a Montecatini(Pistoia) Moto:Kawasaki Ninja ZX-9R Scudetti: 29
Messaggi: 53971
|
Diciamo che è IE che sbaglia a fartela vedere
![]() image/jpeg <% Response.expires = 0 Response.expiresabsolute = Now() - 1 Response.addHeader "pragma", "no-cache" Response.addHeader "cache-control", "private" Response.CacheControl = "no-cache" Response.ContentType = "image/jpeg" %> <!--#include file="db.asp"--> <!--#include file="aspmkrfn.asp"--> <% Response.Buffer = True ' Get key sKey = Request.QueryString("key") If sKey = "" Or IsNull(sKey) Then Response.Redirect "Detailslist.asp" Response.End End If ' Open Connection to the database Set conn = Server.CreateObject("ADODB.Connection") conn.Open xDb_Conn_Str sKeyWrk = "" & AdjustSql(sKey) & "" sSql = "SELECT * FROM [Details]" sSql = sSql & " WHERE [ID] = " & sKeyWrk Set rs = Server.CreateObject("ADODB.Recordset") rs.Open sSql, conn If Not rs.Eof Then 'rs.MoveFirst Response.BinaryWrite rs("Photo") End If rs.Close Set rs = Nothing conn.Close Set conn = Nothing %> |
![]() |
![]() |
![]() |
#3 | |
Senior Member
Iscritto dal: Feb 2003
Messaggi: 2805
|
Grandee
Quote:
GRANDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE Adessi SI che prima NO Ahahahahah Ti ringrazio
__________________
AMD 3700x --- ASUS X570 CROSSHEAR VIII HERO --- 4x 8GB Corsair Vengeance RGB PRO 3600 MHz --- SSD: Samsung 980Pro 1TBb --- EVGA RTX 2070 SUPER |
|
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 06:09.