62,243
社区成员




<%@ Page Language="C#" AutoEventWireup="true" CodeFile="A1_1.aspx.cs" Inherits="PBT_A1_1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate"/>
<meta http-equiv="expires" content="0"/>
<title>A1_1</title>
</head>
<body style="background-image: url('../images/pagebody.jpg')">
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server"/>
<asp:UpdatePanel ID="UpdatePanel" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div id="div_pbt" runat="server" style="width:100%; height:100%; top: 0px; left:0px; position: fixed; background-image: url('../images/pbt.jpg');" visible="True">
<table id="tb_pbt" style="width:100%; font-family: 微软雅黑; font-size: 90px; color:#ffffff;" border="0">
<tr style="height:90px">
<td style="width:25px"></td>
<td style="width:930px"></td>
<td style="width:20px"></td>
<td colspan="3" style="width:930px"></td>
<td style="width:15px"></td>
</tr>
<tr style="height:60px;font-size:45px">
<td style="width:25px"></td>
<td style="width:930px"></td>
<td style="width:20px"></td>
<td style="width:300px"></td>
<td style="width:560px">
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table id="tb_Time" style="width:100%; font-family: 微软雅黑; " border="0">
<tr style="height:100%">
<td style="width:100%"> <span style="position:relative; margin:0 3px 0px 0;float:left;"></span><asp:Label ID="Lb_Time" runat="server" ForeColor="Black"></asp:Label></td>
</tr>
</table>
<asp:Timer ID="Timer2" runat="server" Interval="100" OnTick="Timer2_Tick" Enabled="False"></asp:Timer>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer2" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
</div>
</td>
<td style="width:70px"></td>
<td style="width:15px"></td>
</tr>
<tr style="height:40px">
<td style="width:25px"></td>
<td style="width:930px"></td>
<td style="width:20px"></td>
<td colspan="3" style="width:930px"></td>
<td style="width:15px"></td>
</tr>
<tr style="height:150px">
<td style="width:25px"></td>
<td style="width:930px">2号</td>
<td style="width:20px"></td>
<td colspan="3" style="width:930px">1号</td>
<td style="width:15px"></td>
</tr>
<tr style="height:20px">
<td style="width:25px"></td>
<td style="width:930px"></td>
<td style="width:20px"></td>
<td colspan="3" style="width:930px"></td>
<td style="width:15px"></td>
</tr>
<tr style="height:150px">
<td style="width:25px"></td>
<td style="width:930px">产地:<asp:Label ID="Lb_cd2" runat="server" Text=""></asp:Label></td>
<td style="width:20px"></td>
<td colspan="3" style="width:930px">产地:<asp:Label ID="Lb_cd1" runat="server" Text=""></asp:Label></td>
<td style="width:15px"></td>
</tr>
<tr style="height:25px">
<td style="width:25px"></td>
<td style="width:930px"></td>
<td style="width:20px"></td>
<td colspan="3" style="width:930px"></td>
<td style="width:15px"></td>
</tr>
</table>
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
<asp:Timer ID="Timer1" runat="server" Interval="100" OnTick="Timer1_Tick" Enabled="False"></asp:Timer>
</div>
</form>
</body>
</html>
//后台
{
if (!IsPostBack)
{
Timer1.Enabled = true;
Timer2.Enabled = true;
}
}
protected void Timer1_Tick(object sender, EventArgs e)
{
Timer1.Enabled = false;
ReadPBTInfo();
Timer1.Interval = PageTime_Norm;
Timer1.Enabled = true;
}
protected void Timer2_Tick(object sender, EventArgs e)
{
Timer2.Enabled = false;
Lb_Time.Text = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
Timer2.Interval = 1000;
Timer2.Enabled = true;
}