Solved

programmatically "refresh" web page or browser or user control

Posted on 2015-01-13
2
834 Views
Last Modified: 2015-01-13
Can Javascript programmatically do the same thing as pressing "F5"  (browser refresh) inside of a browser (like IE5 or Chrome)?

I have a User Control which, during the page life-cycle, gets assigned to it's datasource and lists the items it is given (according to what comes back from the database).

Is there a way to cause a control to do this programmatically after deleting or adding list items?

I am in Visual Studio 2010.
0
Comment
Question by:knowlton
2 Comments
 
LVL 30

Accepted Solution

by:
Alexandre Simões earned 500 total points
ID: 40547241
In javascript, if you want to refresh a page you can do:

window.location.reload();

Open in new window

A Ctrl+F5 (that invalidate all browser cache) is like:
window.location.reload(true);

Open in new window

0
 
LVL 5

Author Closing Comment

by:knowlton
ID: 40547513
That works!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
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…

820 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