Page refresh

Add-in Express™ Support Service
That's what is more important than anything else

Page refresh
I need to refresh the page when clicking on a button in the toolbar 
Fady Sayegh




Posts: 7
Joined: 2012-09-12
Hi all,

i have created a toolbar. i need to refresh the page when i click on a button of the toolbar.


best regards and thanks in advance

Fady Sayegh
Posted 12 Sep, 2012 17:17:24 Top
Eugene Astafiev


Guest


Hi Fady,

Please use the following code in the Click event handler of your toolbar button:

private void button1_Click(object sender, EventArgs e)
{
    IEApp.Refresh();
    //IEApp.Refresh2(0);
}


As you may see, you can use the http://msdn.microsoft.com/en-us/library/aa768258%28v=vs.85%29.aspx or http://msdn.microsoft.com/en-us/library/aa768260%28v=vs.85%29.aspx method to get the job done. The Refresh2 method accepts the following constants:

 REFRESH_NORMAL = 0,
REFRESH_IFEXPIRED = 1,
REFRESH_COMPLETELY = 3


The MSDN http://msdn.microsoft.com/en-us/library/aa768363%28v=vs.85%29.aspx provides the following description:


REFRESH_NORMAL
Refresh without sending a "Pragma:no-cache" HTTP header to the server.
REFRESH_IFEXPIRED
Not currently implemented.
REFRESH_COMPLETELY
Refresh without forced cache validation by sending a "Pragma:no-cache" header to the server (HTTP URLs only). Same as pressing Ctrl+F5 in Microsoft Internet Explorer.


It is up to you which method is to choose.
Posted 13 Sep, 2012 03:51:55 Top
Fady Sayegh




Posts: 7
Joined: 2012-09-12
Hi Eugene,
it works fine

Thanks

Fady Sayegh
Posted 13 Sep, 2012 04:54:33 Top