<%@ Page Language="C#" AutoEventWireup="true" CodeFile="champ_cache.aspx.cs" Inherits="champ_cache" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Test de champ caché</title>
</head>
<body>
<script runat="server">
    string valeur;
</script>
<%
    if (Request["champ_cache"] != null && Request["champ_cache"] != "")
        valeur = Request["champ_cache"];
    else
    {
        valeur = DateTime.Now.ToShortTimeString();
        Response.Write("Nouvel utilisateur connecté à " + valeur);
    }
%>
    <form id="form1" runat="server">    
        <input type="hidden" name="champ_cache" value="<%= valeur %>" />
        <input type="submit" name="b" value="Recharger" />    
    </form>
</body>
</html>
