
10/05/2004, 11:15
|
| | Fecha de Ingreso: septiembre-2003
Mensajes: 16
Antigüedad: 21 años, 9 meses Puntos: 0 | |
Hola, mira lo que he hecho.
Basicamente, he partido tu código, en tres cachos
la primera parte, la puse fuera del código HTML. la parte de mostrar la foto, la puse dentro de una tabla que declaré centrada. y el resto fuera del body. Miralo
Saludos
------------------------------------------------------------------------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
' -- file.asp --
' Retrieves binary files from the database
Response.Buffer = True
' ID of the file to retrieve
Dim ID
ID = Request("Idfoto")
If Len(ID) < 1 Then
ID = 7
End If
' Connection String
Dim connStr
connStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
Server.MapPath("db/estaqui.mdb")
' Recordset Object
Dim rs
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "select [FileData],[FileData1],[FileData2],[FileData3],[Fi
leData4] from fotografias where Idfoto = " & _
ID, connStr, 2, 4
%>
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="200" border="1" align="center">
<tr>
<th scope="col">
<% If Not rs.EOF Then
Response.BinaryWrite rs("FileData1")
End If
%>
</th>
</tr>
</table>
</body>
<%
rs.Close
Set rs = Nothing;
%>
</html> |