开发者

.NET WebBrowser problem

I am using the WebBrowser control to post some data to a web server. I did notice that this doesn't work all the time if the query is the same and I guess this is due to some caching configuration.

E.g. I did try to post with an extra parameter who's value is the current timestamp but that's not the solutions I want.

I also tried new WebBrowser().Navigate("url here"). This works all the time, but I would like to reuse objects.

The Refresh() method did seem to m开发者_Python百科ake it work some times, but I could not figure out its exact behavior.

So how could I make the webBrowser.Navigate("url here") always hit the server without tricks ? Or what to use instead ?


I may suggest to add fake parameter to your target url, for example add "&request10022" It will not take data from cache.


Beside @TheNIK suggestion, as WebBrowser uses Internet explorer engine, so disabling IE cache also works as described here

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜