Refreshing any page after certain interval RRS feed

  • Question

  • User-923862037 posted

    Refreshing any page after certain interval in asp.net can be done simply by

    Response.AppendHeader("Refresh", "20; URL=<SOMEPAGE>.aspx")

    This method will reload the current window after interval mentioned in the second parameter to the page which is mentioned as URL to refresh. In this case page will be refreshed after 20 seconds.

    Wednesday, May 23, 2007 7:52 AM

All replies

  • User-538399468 posted

    You can add a dropdown control....


                <asp:DropDownList ID="ddlRefreshRate" runat="server" AutoPostBack="True">
                    <asp:ListItem Value="5">5 Seconds</asp:ListItem>
                    <asp:ListItem Value="30">30 Seconds</asp:ListItem>
                    <asp:ListItem Value="60">60 Seconds</asp:ListItem>
                    <asp:ListItem Value="120">120 Seconds</asp:ListItem>
    Response.AppendHeader("Refresh", Me.ddlRefreshRate.SelectedValue & "; URL=.aspx")


    Thursday, May 24, 2007 4:03 PM
  • User445179017 posted

    This is another method of refreshing a page, using the META tags in the <head> section

    <META HTTP-EQUIV="Refresh" CONTENT="1200"> (Refreshes the page in 1200 seconds)

    <META HTTP-EQUIV="Refresh" CONTENT="10;URL=http://www.newsite.com"> (Refreshes the page in 10 seconds by loading the url specified)


    Saturday, May 26, 2007 3:59 AM