Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

programmatically "refresh" web page or browser or user control

Posted on 2015-01-13
2
Medium Priority
?
1,194 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:Tom Knowlton
2 Comments
 
LVL 30

Accepted Solution

by:
Alexandre Simões earned 2000 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:Tom Knowlton
ID: 40547513
That works!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
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

885 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