Partial Class TimerSec Inherits System.Web.UI.Page Shared iSec As Integer Protected Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick iSec = iSec + 1 Label1.Text = iSec.ToString() & "秒" End Sub Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then iSec = 0 End If End Sub End Class