浏览器控件中的“刷新”和“导航”功能之间的区别? [英] Difference between Refresh and Navigate function in browser control?

查看:96
本文介绍了浏览器控件中的“刷新”和“导航”功能之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

昨天,我遇到了一个用来显示视图的站点(即没有人访问过该页面)。当我单击刷新按钮时,计数开始增加。

Yesterday I came across one of the sites that uses to display the "Views"(i.e.the no of persons visited the page).When I clicked the refresh button the count started increasing.

然后,我编写了这个小应用程序以增加视图计数。

Then I wrote this small application to increase the view count.

 browser = new WebBrowser();
 for (int index = 0; index < 250000; index++)
 {
   {
     browser.Navigate("url");
     System.Threading.Thread.Sleep(100);
   }
 }

我报告了该错误,他们已将其纠正。即使我按F5按钮,观看次数也不会增加。但是当我运行上述程序时,观看次数就会开始增加。

I reported the bug and they have rectified it.Now even if I press the F5 button the view count won't increase.But when I run the above program the count starts increasing..

有人可以解释一下导航功能并刷新(F5)?

Can somebody explain me the difference between Navigate function and Refresh(F5)?

推荐答案

导航


将文档加载到指定的统一资源定位符(URL)进入WebBrowser控件,替换上一个文档

刷新


重新加载文档当前显示在WebBrowser控件中。

Reloads the document currently displayed in the WebBrowser control.

刷新文档只是重新加载当前页面,因此,导航,导航和文档调用Refresh方法时,不会发生ntCompleted事件。

A document refresh simply reloads the current page, so the Navigating, Navigated, and DocumentCompleted events do not occur when you call the Refresh method.

注意:链接用于Web浏览器控件,但我认为它们的信息有效

Note: Links are for webbrowser control but I presume their information is valid

这篇关于浏览器控件中的“刷新”和“导航”功能之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆