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


Add-in Express team


Posts: 8540
Joined: 2007-07-25
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 Refresh or Refresh2 method to get the job done. The Refresh2 method accepts the following constants:

 REFRESH_NORMAL = 0,
REFRESH_IFEXPIRED = 1,
REFRESH_COMPLETELY = 3


The MSDN page 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.
.NET, Extended MAPI, Windows Phone & RT
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