473,749 Members | 2,411 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

AxWebBrowser problem!

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 shortly, so I don't take too much of
your time.

Problem:
On the form I have AxWebBrowser box, and I load the page in it,
normally you would do it like this:

Dim finalurl as string = "http://www.mysite.com/example.php"
AxWebBrowser1.N avigate2(finalu rl)

I set up a timer1 tick to go off every 10 minutes.
Example.php I am trying to load is a php script which comes up to have
different variables everytime you reload/refresh it.

In my case everytime I call the page, variables are the same. It never
refreshes it.

So I did my research and there was a suggestion to do this:

AxWebBrowser1.R efresh2(finalur l)
AxWebBrowser1.N avigate2(finalu rl)
So I did another research and there was a suggestion to do this:

Dim finalurl as string = "http://www.mysite.com/example.php"
Dim REFRESH_COMPLET ELY As Object = 3
AxWebBrowser1.R efresh2(REFRESH _COMPLETELY)
AxWebBrowser1.N avigate2(finalu rl)

Well, this didn't work either.
So after another day of browsing Google, I found that someone
suggested to do this:

Private Enum BrowserNavConst ants As Integer
navOpenInNewWin dow = &H1
navNoHistory = &H2
navNoReadFromCa che = &H4
navNoWriteToCac he = &H8
navAllowAutosea rch = &H10
navBrowserBar = &H20
navHyperlink = &H40
End Enum

and then call AxWebBrowser like this, so it is using property called:
navNoReadFromCa che

AxWebBrowser1.N avigate2(finalu rl,
BrowserNavConst ants.navNoReadF romCache, Nothing, Nothing, Nothing)
Well, this doesn't work either and my application is not refreshing
the values, which I need to bring into the program.

Guys, I am really lost and I've got to the point of resignation. I
simly can't get it to work and no one can figure out how to do this.

Someone suggested to delete cookies and temporary cache files which
this php page is creating.
But that is not easy, location differs from pc to pc, and from
platform to platform and Ireally believe, that there should be some
other way of doing it.

Now, one valid point and that might be a help.
While application is running and refreshing values every 10 minutes,
NOTHING CHANGES, variables are still the same.
But if I open my Internet Explorer and go to the page (example.php),
it shows me updated values.
And my program as if someone used a magic stick, refreshes too.

So, what should I do? Is there any, and I mean any way, to refresh,
reload AxWebBrowser?
Any way to make it, so it doesn't read the page from cache?

Please, your help will be greatly appreciated.

Martin Ho.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Jul 21 '05 #1
4 3784
Hi Martin,

The AxWebBrowser uses the same cache settings as IE does. Why it's
always reading from cache, I can't answer, but I can suggest an
alternative that does not rely on the AxWebBrowser. (It is worth noting
that the AxWebBrowser is buggy, always has been, always will be. One of
the reasons why the System.Net namespace has the
WebClient/WebResponse/WebClient classes).

If you insist on using the browser control, then what I would make sure
of is that your php page is set to expire immediately. Also, you should
set a pragma-no-cache meta tag to be on the safe side.

If you don't need the browser functionality (you had mentioned that you
were reading variables from the php page), I would recommend web page
scraping using the System.Net namespace. (I can't give code samples as I
am not a VB programmer):

http://www.codersource.net/csharp_screen_scraping.html
http://aspalliance.com/cookbook/View...spx?Chapter=21

Using this method, you are never going to cache and you don't have to
deal with ugly ActiveX controls.

HTH,
~d

Martin Ho wrote:
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 shortly, so I don't take too much of
your time.

Problem:
On the form I have AxWebBrowser box, and I load the page in it,
normally you would do it like this:

Dim finalurl as string = "http://www.mysite.com/example.php"
AxWebBrowser1.N avigate2(finalu rl)

I set up a timer1 tick to go off every 10 minutes.
Example.php I am trying to load is a php script which comes up to have
different variables everytime you reload/refresh it.

In my case everytime I call the page, variables are the same. It never
refreshes it.

So I did my research and there was a suggestion to do this:

AxWebBrowser1.R efresh2(finalur l)
AxWebBrowser1.N avigate2(finalu rl)
So I did another research and there was a suggestion to do this:

Dim finalurl as string = "http://www.mysite.com/example.php"
Dim REFRESH_COMPLET ELY As Object = 3
AxWebBrowser1.R efresh2(REFRESH _COMPLETELY)
AxWebBrowser1.N avigate2(finalu rl)

Well, this didn't work either.
So after another day of browsing Google, I found that someone
suggested to do this:

Private Enum BrowserNavConst ants As Integer
navOpenInNewWin dow = &H1
navNoHistory = &H2
navNoReadFromCa che = &H4
navNoWriteToCac he = &H8
navAllowAutosea rch = &H10
navBrowserBar = &H20
navHyperlink = &H40
End Enum

and then call AxWebBrowser like this, so it is using property called:
navNoReadFromCa che

AxWebBrowser1.N avigate2(finalu rl,
BrowserNavConst ants.navNoReadF romCache, Nothing, Nothing, Nothing)
Well, this doesn't work either and my application is not refreshing
the values, which I need to bring into the program.

Guys, I am really lost and I've got to the point of resignation. I
simly can't get it to work and no one can figure out how to do this.

Someone suggested to delete cookies and temporary cache files which
this php page is creating.
But that is not easy, location differs from pc to pc, and from
platform to platform and Ireally believe, that there should be some
other way of doing it.

Now, one valid point and that might be a help.
While application is running and refreshing values every 10 minutes,
NOTHING CHANGES, variables are still the same.
But if I open my Internet Explorer and go to the page (example.php),
it shows me updated values.
And my program as if someone used a magic stick, refreshes too.

So, what should I do? Is there any, and I mean any way, to refresh,
reload AxWebBrowser?
Any way to make it, so it doesn't read the page from cache?

Please, your help will be greatly appreciated.

Martin Ho.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Jul 21 '05 #2

D0tN3t C0d3r wrote:
Hi Martin,

The AxWebBrowser uses the same cache settings as IE does. Why it's
always reading from cache, I can't answer, but I can suggest an
alternative that does not rely on the AxWebBrowser. (It is worth noting that the AxWebBrowser is buggy, always has been, always will be. One of the reasons why the System.Net namespace has the
WebClient/WebResponse/WebClient classes).

If you insist on using the browser control, then what I would make sure of is that your php page is set to expire immediately. Also, you should set a pragma-no-cache meta tag to be on the safe side.

If you don't need the browser functionality (you had mentioned that you were reading variables from the php page), I would recommend web page scraping using the System.Net namespace. (I can't give code samples as I am not a VB programmer):

http://www.codersource.net/csharp_screen_scraping.html
http://aspalliance.com/cookbook/View...spx?Chapter=21

Using this method, you are never going to cache and you don't have to deal with ugly ActiveX controls.

HTH,
~d

Martin Ho wrote:
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 shortly, so I don't take too much of your time.

Problem:
On the form I have AxWebBrowser box, and I load the page in it,
normally you would do it like this:

Dim finalurl as string = "http://www.mysite.com/example.php"
AxWebBrowser1.N avigate2(finalu rl)

I set up a timer1 tick to go off every 10 minutes.
Example.php I am trying to load is a php script which comes up to have different variables everytime you reload/refresh it.

In my case everytime I call the page, variables are the same. It never refreshes it.

So I did my research and there was a suggestion to do this:

AxWebBrowser1.R efresh2(finalur l)
AxWebBrowser1.N avigate2(finalu rl)
So I did another research and there was a suggestion to do this:

Dim finalurl as string = "http://www.mysite.com/example.php"
Dim REFRESH_COMPLET ELY As Object = 3
AxWebBrowser1.R efresh2(REFRESH _COMPLETELY)
AxWebBrowser1.N avigate2(finalu rl)

Well, this didn't work either.
So after another day of browsing Google, I found that someone
suggested to do this:

Private Enum BrowserNavConst ants As Integer
navOpenInNewWin dow = &H1
navNoHistory = &H2
navNoReadFromCa che = &H4
navNoWriteToCac he = &H8
navAllowAutosea rch = &H10
navBrowserBar = &H20
navHyperlink = &H40
End Enum

and then call AxWebBrowser like this, so it is using property called: navNoReadFromCa che

AxWebBrowser1.N avigate2(finalu rl,
BrowserNavConst ants.navNoReadF romCache, Nothing, Nothing, Nothing)
Well, this doesn't work either and my application is not refreshing
the values, which I need to bring into the program.

Guys, I am really lost and I've got to the point of resignation. I
simly can't get it to work and no one can figure out how to do this.
Someone suggested to delete cookies and temporary cache files which
this php page is creating.
But that is not easy, location differs from pc to pc, and from
platform to platform and Ireally believe, that there should be some
other way of doing it.

Now, one valid point and that might be a help.
While application is running and refreshing values every 10 minutes, NOTHING CHANGES, variables are still the same.
But if I open my Internet Explorer and go to the page (example.php), it shows me updated values.
And my program as if someone used a magic stick, refreshes too.

So, what should I do? Is there any, and I mean any way, to refresh,
reload AxWebBrowser?
Any way to make it, so it doesn't read the page from cache?

Please, your help will be greatly appreciated.

Martin Ho.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com


Jul 21 '05 #3
Can anyone help, please?

Jul 21 '05 #4
I've ran into this thread as I was having the same issue.

My solution was to prevent the page itself fom being cached:

response.buffer = true
response.cacheC ontrol = "no-cache"
response.addHea der "Pragma", "no-cache"
response.expire s = -1

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2319
by: Mantorok | last post by:
Hi Is there anyway to get a WebBrowser to work without placing it on a form. I want to be able to instantiate a browser, complete some of the fields and submit, but whenever I try to navigate I get: An unhandled exception of type 'InvalidActiveXStateException' occurred in axinterop.shdocvw.dll
3
10206
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 probablem has come back even if both are installed. When I open a windows form that has the Browser on it and try to Navigate to a page using the OnEnter or OnLoad events, the page just sits there and does
0
473
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 shortly, so I don't take too much of your time. Problem:
6
2106
by: MARTIN LANNY | last post by:
Is there alternative to AxWebBrowser? I spent one whole week trying to make AxWebBrowser refresh php page. It never works. I tried over 10-15 suggestions from Microsoft itself. Refresh just doesn't work. I tried to create AxWebBrowser programatically, but it throws exceptions when I want to dispose it and no one was able to help me or tell me why.
4
883
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 shortly, so I don't take too much of your time. Problem:
12
6928
by: Don Juan | last post by:
I have had a terrible 10 days period with AxWebBrowser ActiveX Control. I can't understand why there is no goog documentation and tutorials for that monster.
5
1811
by: Thom Little | last post by:
I have a windows application that has an update form that uses AxWebBrowser to connect to a distribution site. This site uses a Response.Redirect to download of either a .msi file or a .zip file. I have tried this under four systems Windows XP, Windows 2000, Server 2003 with mixed results. Sometimes the .msi file is blocked. Sometime the .zip file is blocked. Sometimes both are blocked. Sometimes neither is blocked. If the...
6
3767
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 AxWebBrowser.Document: When I print browser.Document.GetType().ToString() at runtime, I get "mshtml.HTMLDocumentClass". But The VS2005 compiler does not recognize the member AxWebBrowser.Document as anything other than a System.Object -- e.g.,...
2
2073
by: gkostova | last post by:
Hello, Can someone help me. I use Web Browser in my windows form to display html document using flash and javascript, the problem is that not I canot navigate trought all pages of the flash . Then I decided to use AxWebBrowser and wrote AxWebBrowser webBr = new AxWebBrowser(); form.Controls.Add(webBr); form.Activate(); webBr.Dock = DockStyle.Fill; webBr.Parent =...
0
8996
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9566
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9388
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9254
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8256
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6800
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3319
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.