Results 1 to 4 of 4

Thread: How to write script to page reload in ASP

  1. #1
    Join Date
    Oct 2008
    Posts
    75

    How to write script to page reload in ASP

    How one can write an script to reload the page in ASP.Net, for more details, i wanted to format the page where i want to provide the Button which should Reload the page this will help the user to not to go anywhere on the Browser they would get the button on their existing page.

  2. #2
    Join Date
    Jan 2009
    Posts
    143

    Re: How to write script to page reload in ASP

    You need to use the following methods to reload and refresh the page, YOu could have the same page be separated. one loads the blank html form. when it submits have it submit to itself. and detect for data in some fields or a variable. DataBind the other control on the OnButtonClick event for the update button.

    function doLoad()
    {
    // make sure to timeout value should be the same as in the "refresh" meta-tag
    setTimeout( "refresh()", 3*1500 );
    }

    function refresh()
    {
    // This version of the refresh function will cause a new
    // entry in the visitor's history. It is provided for
    // those browsers that only support JavaScript 1.0.
    //
    window.location.href = sURL;
    }

  3. #3
    Join Date
    Jan 2006
    Posts
    211

    Re: How to write script to page reload in ASP

    One way to handle this could be using Bubble events. You can create a bubble event and call it from within each user control tab to rebind that data. If you use Response.Redirect() there is an options to end response by setting a boolean value. You might want to take a look at this.

    <body onload="timer=setTimeout('move()',2000)">

    In the above example of JavaScript that will reload a page in 3 seconds. See timer=setTimeout('move()',2000) 2000 will be the counter number of milliseconds which equals to 2 seconds. after it gets complete the page will be refreshed.

  4. #4
    Join Date
    Mar 2008
    Posts
    335

    Re: How to write script to page reload in ASP

    I think you are making it a bit to complicated for yourself and i presume you don't need to reload every page that uses the header.asp include. You need to simply add a metarefesh tag to execute the code if the variable matches first load, else just display the page. It defines multiple JavaScript code blocks, where each JavaScript version block redefines the same function.

Similar Threads

  1. How to setup automatic timed page reload Webpages in Firefox?
    By Corry in forum Technology & Internet
    Replies: 5
    Last Post: 03-02-2010, 01:34 PM
  2. Update a page content without reload
    By Cabexas in forum Software Development
    Replies: 3
    Last Post: 07-11-2009, 09:42 PM
  3. Facebook page reload error
    By PinkShell123 in forum Technology & Internet
    Replies: 3
    Last Post: 03-11-2009, 10:19 PM
  4. How to force a complete reload of a page in asp.net
    By Integer in forum Software Development
    Replies: 3
    Last Post: 17-03-2009, 11:55 PM
  5. Reload web page without clearing cache in firefox
    By PsYcHo 1 in forum Tips & Tweaks
    Replies: 1
    Last Post: 27-11-2008, 05:13 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,054,884.06002 seconds with 16 queries