Thursday, October 18, 2007

Auto-refresh an ASPX page

This is especially useful when using a master page but you don't want every page using the master page to refresh.

In the Page_Load() event handler, add this code:

'Refresh the page every 30 seconds.
Dim lit As New LiteralControl("<meta equiv=""refresh"" content=""30"" />")
Header.Controls.Add(lit)

No comments: