dataslide.aspx

来自「asp.net技术内幕的书配源码」· ASPX 代码 · 共 29 行

ASPX
29
字号
<Script Runat="Server">

Sub Page_Load
  Dim strTime As String

  strTime = Cache( "Time" )
  If strTime Is Nothing Then
    strTime = DateTime.Now.ToString( "T" )
    Cache.Insert("Time", strTime, Nothing, _
      Cache.NoAbsoluteExpiration, TimeSpan.FromMinutes( 1 ) )
  End If
  lblMessage.Text = strTime
End Sub
</Script>

<html>
<head><title>DataSlide.aspx</title></head>
<body>

Data last cached:
<asp:Label
  ID="lblMessage"
  Font-Bold="True"
  ForeColor="Blue"
  Runat="Server" />

</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?