0

I need to refresh browser via c# code and google keeps silence. Any help would be very appreciated.

er-v
  • 4,405
  • 3
  • 30
  • 37
  • 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 Answers4

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:

Can Silverlight initiate Page Refreshes?

Community
  • 1
  • 1
kemiller2002
  • 113,795
  • 27
  • 197
  • 251
0
Response.Redirect("the_page_you_want_to_refresh.aspx");
Flakron Bytyqi
  • 3,234
  • 20
  • 20
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