Solved

How to auto refresh an ASP.NET page

Posted on 2010-11-14
2
914 Views
Last Modified: 2012-05-10
I need to refresh an Asp.net page automatically based on the refresh interval.
Please note that I am using master page in my project.

How can I do that. I tried one optiom of adding this in my master page but that refreshes content in all the pages that use the master page
<meta id="RefreshPeriod" runat="server" http-equiv="refresh" content="60" />
0
Comment
Question by:countrymeister
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
Griffin74 earned 500 total points
ID: 34132064
You can do this by adding a javascript function into the page you wish to reload, like this:

    <script type="text/javascript" language="javascript">
        function ReloadPage()
        {
                location.reload();
        }

    </script>

Drop a timer control onto your page, set its interval to the refresh interval you require. On the OnTick event of the timer call the ReloadPage() function.  When the timer hits the interval you have specified, the ReloadPage function will fire and your page will reload.

Hope this helps.
0
 
LVL 1

Author Closing Comment

by:countrymeister
ID: 34132261
thanks , that was great
0

Featured Post

A new era in Cloud training has arrived.

A day that will go down in Cloud history.. But are you ready for it? Will you accept this Cloud challenge?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question