在窗口电话7中清除历史记录webbrowser?

时间:2011-08-24 06:39:36

标签: c# windows-phone-7

在我的应用程序中,我使用webbrowser控件。

#region show adve....
        public void ShowAd(string link)
        {
            linkFromservices = "http://ads.diadiem.com/www/delivery/afr.php?refresh=10&zoneid=66&...=";
            client = new WebClient();
            client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(client_DownloadStringCompleted);
            client.DownloadStringAsync(new Uri(linkFromservices, UriKind.RelativeOrAbsolute));
        }

        void client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
        {
            result = string.Empty;

            try
            {
                result = e.Result;

                if (!string.IsNullOrEmpty(result))
                {
                    result = AddScripttoHTML(result);
                    webBrowser.NavigateToString(result);
                }
            }
            catch (Exception ex) { }
            finally
            {
                result = string.Empty;
                client.DownloadStringCompleted -= new DownloadStringCompletedEventHandler(client_DownloadStringCompleted);
            }
        }
        #endregion

在此链接中“http://ads.diadiem.com/www/delivery/afr.php?refresh = 10& zoneid = 66& ...”您可以看到refesh = 10。每隔10秒,浏览器就会自动刷新并随机改变当前的广告.....

但刷新内存从200KB增加到400KB。

如何在窗口电话7中发布或清除历史记录webbrowser?

谢谢大家!请帮帮我.......

1 个答案:

答案 0 :(得分:0)

WP7的webbrowser控件无法清除历史记录,您需要创建自己的Web浏览器:

http://franciscojf.wordpress.com/2011/03/27/full-web-browser-control-for-windows-phone-7/