Bien le bonjour a tous

voici ci-dessous le code d'une page en test dans la quelle je mets un label ( label1), qui doit m'indiqué l'heure en continu, mais lors de refresh toutes les sec, toute la page fait un flash et c'est pas tres agréable dois-je dire. Si quelqu'un vois le pourquoi, j'en serais bien heureux ....


partie VB
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
  Protected Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
            Label1.Text = DateTime.Now.ToLongTimeString()
 
      End Sub


partie ASP
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb"%>
 
<!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></title>
 
 
    <style type="text/css">
        .style1
        {
            width: 100%;
            border-collapse: collapse;
 
        }
    </style>
</head>
<body  background="Images/Background_black.jpg">
    <form id="form1" runat="server">
    <div>
 
        <table cellpadding="0" class="style1">
            <tr>
                <td>
                    &nbsp;</td>
                <td style="width: 1024px">
                    <br />
                    <asp:Timer ID="Timer1" runat="server" Interval="1000">
                    </asp:Timer>
                    <br />
                    <asp:ScriptManager ID="ScriptManager1" runat="server">
                    </asp:ScriptManager>
                    <br />
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            <asp:Label ID="Label1" runat="server" style="color: #FFFF66" Text="Label"></asp:Label>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                    <br />
                    <br />
                    <br />
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td style="vertical-align: top; text-align: right;">
                    &nbsp;</td>
                <td style="background-position: center top; width: 1024px; background-image: url('Images/1024x900.png'); background-repeat: no-repeat; height: 900px; vertical-align: top;">
 
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td style="width: 1024px">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td style="width: 1024px">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
 
    </div>
    </form>
</body>
</html>