Folder WebViewURL

  • Thread starter Thread starter Neetu
  • Start date Start date
N

Neetu

in our addin we have folders and
for each folder some URL setting is done. like ..

MAPIfolder lobjmfCustomer;

lobjmfCustomer.WebViewURL = lstrUrl;
lobjmfCustomer.WebViewOn = true;
lobjmfCustomer.WebViewAllowNavigation = true;

on click of a folder ( f1) we are able to browse specfied url.
we do some operation like adding of data into webpages.after that page get
refreshed. after this if we clicks some other folder (f2) and browsed url
and again clicks on last clicked folder (f1),
specified web page get displayed without any update made in last browsing.

we also noticed , when we click back a folder 2nd time ( like from f2-> f1)
.. there is no web server hit.( we tried it by putting breakpoint of server
web page).
but if we do some operation , send data back to server via web pages , it
hits the server and update the webpage.

so each time, after clicking another folder and coming back to same folder,
data is not refreshing as equivalent to requesting page 1st time for server.
but if we clicks some button over pages, it updated the page with last time
entered data.

Any issue or in built bug is this with outlook?
I am using c# and VSTO for outlook 2007
 
Does it help if you handle the Explorer.BeforeFolderSwitch event and if the
switch is to your folder turning off then on the WebViewOn property?
 
Hello ken,

I m catching Explorer.BeforeFolderSwitch event and Set WebViewOn property.

however still , when i m navigating from one folder to another same 1st
state is
visible at internet explorer of Outlook.
 
Are you setting WebViewURL = "" and WebViewOn = false, then setting the URL
and view on again for NewFolder before exiting the BeforeFolderSwitch event
handler?
 
Hi Neetu,
I m catching Explorer.BeforeFolderSwitch event and Set WebViewOn
property.

however still , when i m navigating from one folder to another same
1st state is
visible at internet explorer of Outlook.

Maybe the IE control is just caching the web site. Are you in control of
the web site which is called? If yes, try to set the expires header to the
current time so that the client recognizes that it must reload the page
content.
If you are not in control of the website, you need to add some bogus
URL parameter like <yourUrl>&dummy=<currentTimeStamp>. So you
woule need the above events and change the webview-URL each time
your folder is selected.
 
It got resolved.
I set <%@ OutputCache Duration="1" Location="Client" VaryByParam="none"
%> at my aspx page


Thanks for guidance.
 
Back
Top