Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
' 自動更新(非PostBack)
Dim refreshHtmlMeta As New HtmlMeta()
refreshHtmlMeta.HttpEquiv = "refresh"
refreshHtmlMeta.Content = "10"
Me.Master.Page.Header.Controls.Add(refreshHtmlMeta)
'自動更新(PostBack)
'Dim scriptManager As ClientScriptManager = Me.Master.Page.ClientScript
'If Not scriptManager.IsStartupScriptRegistered("refreshScript") Then
' Dim scriptText As String = String.Format("setTimeout( function() {{ document.{0}.submit(); }}, {1})", Me.Form.ClientID, 2000)
' scriptManager.RegisterStartupScript(Me.GetType(), "refreshScript", scriptText, True)
'End If
End Sub
|