Response.Expires duer ik!
Hej..Jeg har nedenstående kode, som skal refreshes når den loades..
Problemer er at når en bruger har uploadet et billede til hans 'profil' i databasen og gerne vil se det, så viser den det billede der lå der i forvejen og ikke det nye, som lige er blevet uploadet..
Men hvis man trykker F5 og refresher siden, så kommer det nye billede frem..
Jeg har prøvet med
Response.Expires = 0
Response.Expires = -1
Response.Expires = -1442
men det duer ik..
Ka man bytte rundt på noget af koden, så den henter det nyeste billede frem..
----------------------------------
KODEN : image_see_dk.asp
----------------------------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers=""
MM_authFailedURL="login_dk.asp"
MM_grantAccess=false
If Session("MM_Username") <> "" Then
If (true Or CStr(Session("MM_UserAuthorization"))="") Or _
(InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
MM_grantAccess = true
End If
End If
If Not MM_grantAccess Then
MM_qsChar = "?"
If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
MM_referrer = Request.ServerVariables("URL")
if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
Response.Redirect(MM_authFailedURL)
End If
%>
<!--#include file="../../Connections/ConnApplicants.asp" -->
<%
Dim RecImage__MMColParam
RecImage__MMColParam = "1"
If (Session("MM_Username") <> "") Then
RecImage__MMColParam = Session("MM_Username")
End If
%>
<%
Dim RecImage
Dim RecImage_numRows
Set RecImage = Server.CreateObject("ADODB.Recordset")
RecImage.ActiveConnection = MM_ConnApplicants_STRING
RecImage.Source = "SELECT * FROM applicants WHERE email = '" + Replace(RecImage__MMColParam, "'", "''") + "'"
RecImage.CursorType = 0
RecImage.CursorLocation = 2
RecImage.LockType = 1
RecImage.Open()
RecImage_numRows = 0
%>
<html>
<head>
<title>Velkommen til enMulighed</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../../stylesheet.css" rel="stylesheet" type="text/css">
</head>
<body background="../../images/background.gif" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- #BeginLibraryItem "/Library/topsite_top_dk.lbi" -->
<link href="../../stylesheet.css" rel="stylesheet" type="text/css">
<table width="740" height="81" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="335" height="81" rowspan="2"><img src="../../flash/flash_corner.jpg" width="335" height="81"></td>
<td width="405" height="60"><img src="../../images/logo_main.gif" width="261" height="44"></td>
</tr>
<tr>
<td width="405" height="21">
<div align="right">
<p align="right" class="topsite-tekst"> hjælper dig med at finde
arbejde i Storbritanien</p>
</div></td>
</tr>
</table>
<!-- #EndLibraryItem --><!-- #BeginLibraryItem "/Library/topsite_flash_dk.lbi" --><table width="740" height="102" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="740" height="102">
<param name="movie" value="../../flash/flash_dk.swf">
<param name="quality" value="high">
<embed src="../../flash/flash_dk.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="740" height="102"></embed></object></td>
</tr>
</table><!-- #EndLibraryItem --><!-- #BeginLibraryItem "/Library/topsite_menu_dk.lbi" -->
<link href="../../stylesheet.css" rel="stylesheet" type="text/css">
<table width="740" height="19" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="15"><img src="../../images/menu_orange_left.gif" width="15" height="19"></td>
<td colspan=3 width="658" valign="middle" bgcolor="#000000"> <div align="center" class="topsite-menu-tekst">:
<a href="../index_dk.asp"><font color="#FFFFFF">Hjem</font></a>
: <a href="../om_dk.asp"><font color="#FFFFFF">Om enMulighed</font></a>
: <a href="index_dk.asp"><font color="#FFFFFF">CV</font></a>
: <a href="../nyheder_dk.asp"><font color="#FFFFFF">Nyheder</font></a>
: <a href="../faq_dk.asp"><font color="#FFFFFF">Spørgsmål & Svar</font></a>
: <a href="../links_dk.asp"><font color="#FFFFFF">Links</font></a>
: <a href="../kontakt_dk.asp"><font color="#FFFFFF">Kontakt os</font></a> :</div></td>
<td width="67"><img src="../../images/menu_orange_right.gif" width="67" height="19"></td>
</tr>
</table>
<!-- #EndLibraryItem --><table width="740" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><img src="../../images/spacer.gif" width="1" height="1"></td>
</tr>
</table>
<table width="740" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25%" bgcolor="DAE3E3" valign="top"><!-- #BeginLibraryItem "/Library/submenu_cv_dk.lbi" -->
<link href="../../stylesheet.css" rel="stylesheet" type="text/css">
<table width="185" border="0" cellspacing="0" cellpadding="5">
<tr>
<td><table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td width="6%" height="25"> </td>
<td width="94%" height="25"> </td>
</tr>
<tr>
<td width="6%" height="20"><img src="../../images/other_circle_dark.gif"></td>
<td width="94%" height="20"><a href="index_dk.asp" class="submenu-tekst">CV
Forside</a></td>
</tr>
<tr>
<td width="6%" height="20"><img src="../../images/other_circle_dark.gif"></td>
<td width="94%" height="20"><a href="update_dk.asp" class="submenu-tekst">Opdater
profil</a></td>
</tr>
<tr>
<td width="6%" height="20"><img src="../../images/other_circle_dark.gif"></td>
<td width="94%" height="20"><a href="image_see_dk.asp" class="submenu-tekst">Se
dit profilbillede</a></td>
</tr>
<tr>
<td width="6%" height="20"><img src="../../images/other_circle_dark.gif"></td>
<td width="94%" height="20"><a href="image_dk.asp" class="submenu-tekst">Upload
billede</a></td>
</tr>
<tr>
<td width="6%" height="20"><img src="../../images/other_circle_dark.gif"></td>
<td width="94%" height="20"><a href="delete_dk.asp" class="submenu-tekst">Slet
profil</a></td>
</tr>
<tr>
<td width="6%" height="20"><img src="../../images/other_circle_dark.gif"></td>
<td width="94%" height="20"><a href="logout_dk.asp" class="submenu-tekst">Log
af</a></td>
</tr>
</table></td>
</tr>
</table>
<!-- #EndLibraryItem --></td>
<td width="75%" valign="top">
<table width="100%" border="0" cellspacing="3" cellpadding="3">
<tr>
<td valign="top" width="5%"><img src="../../images/logo_small.gif" align="absmiddle"></td>
<td valign="top" width="95%"><p class="overskrift-1-grey">CV BILLEDE</p>
<p class="tekst">Herunder ses det billede du har til din profil.
Hvis du ønsker at uploade et andet billede, så
brug 'Upload billede' funktionen i menuen til venstre.</p>
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<%
DIM objFSO, billed
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
if objFSO.FileExists(Server.MapPath("\enmulighed\applicants\images\" & (RecImage.Fields.Item("ID").Value) & ".jpg")) then
%>
<img src="../../applicants/images/<%=(RecImage.Fields.Item("ID").Value)%>.jpg" alt="Image" width="200" border="2">
<%
Else
%>
<img src="../../applicants/images/noname.jpg" alt="Image" width="200" border="2">
<%
end if
%>
</td>
</tr>
</table>
<p class="tekst"><br>
<br>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="740" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><img src="../../images/spacer.gif" width="1" height="1"></td>
</tr>
</table>
<!-- #BeginLibraryItem "/Library/bottomsite_blackbox.lbi" --><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="50" bgcolor="#000000"> </td>
</tr>
</table><!-- #EndLibraryItem --><!-- #BeginLibraryItem "/Library/bottomsite_copyright.lbi" -->
<link href="../../stylesheet.css" rel="stylesheet" type="text/css">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20" nowrap>
<div align="center" class="tekst">2003 Copyright enMulighed : Design by
<a href="http://www.e-mind.dk" class="design_2">e-mind</a><a href="http://www.e-mind.dk" class="design_1">media</a></div></td>
</tr>
</table>
<p class="design_2"> </p>
<!-- #EndLibraryItem --></body>
</html>
<%
RecImage.Close()
Set RecImage = Nothing
%>
