473,395 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How do I Prevent The AxWebBrowser Control from Caching a Web Page

Platform: Windows XP and 98
Language: C#

Explanation
We have an in-house call center application that uses the axweb browser control to house various web sites, both internal and external. The problem is intermittent but in some cases we see the first page with the previous customer's information. I have issued commands to clear and abandon sessions, and then change the browser's focus so the commands can take effect.

More specific, this only occurs when we have an internal web site that links to an external client site and then back. Coming back to our site is achieved by looking for a trigger, on the client site, of unique form name and textbox combination. Once this is found in the event handler DocumentComplete, the browser will shift focus to an internal web page for call processing and session clean up. It seems the last page navigation never occurs about 2% - 5% of the time.

Ideally, I would like to figure why this last section is sometimes not executed. Due to deadlines, I will accept a way to force sessions to clear from the browser code (Windows Forms) and not the web project's code. I hope the code provided is enough or a good start.

Thanks in advance

Code
private void axweb_DocumentComplete(object sender, AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent e)
{[indent]ProcessExternalCampaign(e);
}

===============================================

private void ProcessExternalCampaign(AxSHDocVw.DWebBrowserEvent s2_DocumentCompleteEvent e)
{

object formresult = doc2.all.item("_DialerSubmit",null);

//The external script has reached the end and agent/verifier has dipositioned
if(formresult != null)
{
object CurrentCallResult = null;

CurrentCallResult = doc2.all.item("CurrentCallResult",null);
if(CurrentCallResult != null)
{
string sCallResult = ((HTMLInputElementClass)CurrentCallResult).value;

ExternalNavigationClick(ExternalButtonType.Save, "?ExternalDispoCode=" + sCallResult);

}
}
}

================================================

private string ExternalNavigationClick(ExternalButtonType buttonType)
{
ExternalCampaignInfo ec = ((frmMain)Owner).oExternCampaignManager.GetCampaig n(((frmMain)Owner).QueueToLaunchScript);
if(!ec.Registered || !ec.HasButtons) return "";

for(int i=0; i < ec.NavigationButtons.Length; ++i)
{
if(ec.NavigationButtons[i].ButtonType == buttonType)
{
axweb.Navigate(ec.NavigationButtons[i].TargetUrl);
return ec.NavigationButtons[i].TargetUrl;
}
}

return "";
}
Nov 13 '07 #1
0 813

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: Ludwig77 | last post by:
I read that there are some tags that can be entered in a web page's meta tags in order to prevent web bot searching and indexing of the web page for search engines. What is the tagging that I...
4
by: Martin Ho | last post by:
Hey Everyone, I really hope there is someone who can figure out this problem. Honestly, I spent 3 days now trying to find the solution, but nothing works. I'll try to explain the problem...
10
by: Behzad | last post by:
Hi all I'am ASP programmer and I have built a site that users can upload and download files.All things store in a DB and everytime someone enters a page,the application requery the Db and shows...
5
by: R. Ian Lee | last post by:
I have an ASP.NET page that spawns a popup window using javascript's window.open. This works fine. It pops up, you enter some data, press save and everything saves as it should. But, if you...
3
by: Clint MacDonald | last post by:
I have used the AxWebBrowser in a Visual Basic Project... I found that both Framework 1.0 and 1.1 had to be installed for it to work properly. I now have found that in Studio 2003, that the...
0
by: Frankie | last post by:
When I want to prevent a page from being cached, I have been using the following directive: <%@ OutputCache Location="none" %> I have also seen a few other methods recommended to prevent page...
29
by: Vjay77 | last post by:
I have a timer which triggers AxWebBrowser1 every 5 minutes to visit one of my websites. What I find out later in my websites logs, was, that it really visited my website only for the first...
6
by: Dave Booker | last post by:
It appears that I cannot correctly install the AxWebBrowser in VS2005. I can instantiate an "AxWebBrowser browser" and refer to its members, properties, and methods. I'm having trouble with the...
0
by: helveticus | last post by:
I have a master/details configuration that includes multiple user controls. The details page is configured to cache data via VaryByCustom. This works fine. One of the user controls contains an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.