Place your content inside
Ajax UpdatePanel
. And use
Ajax timer
to refresh the same content for regular interval of time.
Ex:
<asp:ScriptManager runat="server" ID="ScriptManager1" />
<asp:Timer ID="Timer1" runat="server" Interval="1000" OnTick="Timer1_Tick">
</asp:Timer>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
<ContentTemplate>
<asp:Label ID="Label1" runat="server"></asp:Label>
</asp:UpdatePanel>
c# code below..
protected void Timer1_Tick(object sender, EventArgs e)
{
Label1.Text = DateTime.Now.ToShortTimeString().ToString();
}
Above code will fetch current time for regular interval of 1 second. You place your code inside update panel and give time as much you wanted to refresh the content..