% Response.buffer=True If Session("LoginName") = "" then Response.redirect "login.asp?Redirect=" &Request.Servervariables("URL") End If %> <% dim adoCn dim strSQL set adoCn = Server.CreateObject("ADODB.Connection") adoCn.Open strConn dim LoginID LoginID=request("LoginID") dim adoRs set adoRs = Server.CreateObject("ADODB.Recordset") strSQL = "SELECT * FROM Login WHERE LoginID = " & LoginID set adoRs = adoCn.Execute(strSQL) if not adoRs.eof then Response.Expires = 0 Response.Buffer = TRUE Response.Clear Response.ContentType = adoRs("mimetype") Response.BinaryWrite adoRs("bindata") adoRs.close end if Set adoRs = nothing adoCn.close set adoCn = nothing %>