Solved

programmatically "refresh" web page or browser or user control

Posted on 2015-01-13
2
708 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
Comment Utility
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
Comment Utility
That works!
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now