Smooth refreshing with smartnavigation
-
I need to refresh my page every 5 seconds (Response.AppendHeader("refresh", "5");)but I want to avoid the flickering on the screen. I'm using (smartNavigation="True" ) to avoid the problem but I did not notice that the flickering has disappered. Is there any other way to solve the problem? or is there something wrong in my code. Feel free to edit in my code so that it works. Thanks. <%@ Register TagPrefix="LAIKACUSTOMER" TagName="Menu" Src="MenuCustomer.ascx" %> <%@ Page smartNavigation="True" language="c#" Codebehind="CustomerSlides.aspx.cs" AutoEventWireup="false" Inherits="CustomerSlides" %>
Here is the code behind for my page: public class CustomerSlides : System.Web.UI.Page { protected System.Web.UI.WebControls.Label Message; protected System.Web.UI.HtmlControls.HtmlGenericControl mainIframe; private void Page_Load(object sender, System.EventArgs e) { //Retrieve the fullPath to the slide to be show from the Session in (Presentations.aspx.cs) string fullPath = Convert.ToString(Application["fullPath"]); if ((fullPath != string.Empty) & (fullPath != null)) { //Find the mainIframe control and add a source attribute to it HtmlControl mainIframe = (HtmlControl)this.FindControl("menuForm").FindControl("mainIframe"); mainIframe.Attributes["src"] = fullPath; //Refreshes the actual page every 15 seconds Response.AppendHeader("refresh", "5"); } else { HtmlControl mainIframe = (HtmlControl)this.FindControl("menuForm").FindControl("mainIframe"); mainIframe.Attributes["src"] = "MainCustomer.aspx"; //mainIframe.Attributes["src"] = "C:/Inetpub/wwwroot/LaikaTeleMeeting/admin/FilesHTML/laika_telemeeting-filer/slide0003.html"; } }