I need to refresh browser via c# code and google keeps silence. Any help would be very appreciated.
Asked
Active
Viewed 1,074 times
0
-
Well, I have browser opened. And i need to refresh it via c# program. So my question is - can I tell something to browser process (somehow) to make it refresh. – er-v Jul 13 '10 at 11:08
4 Answers
0
Consult your browser's documentation for exposed APIs that may allow you to refresh the browser page from a different application, then perform whatever appropriate interop is required to refresh the page.

Greg D
- 43,259
- 14
- 84
- 117
0
So, you can't do it with C#, because C# isn't used on the browser. You can do it through JavaScript though.
<!-- Codes by Quackit.com -->
<a href="javascript:location.reload(true)">Refresh this page</a>
http://www.quackit.com/javascript/javascript_refresh_page.cfm
or: Meta refresh Tag
If you wanted to split hairs, you could technically, do it in silverlight, but that really just ends up calling JavaScript:

Community
- 1
- 1

kemiller2002
- 113,795
- 27
- 197
- 251
0
The awful, round about way to do it is to attach WatiN to the process (find the HWND, attach that way, most likely) and call Browser.Refresh().

Ian P
- 12,840
- 6
- 48
- 70