开发者

Clear history webbrowser in window phone 7?

开发者 https://www.devze.com 2023-03-30 13:50 出处:网络
In my application, i use webbrowser control. #region show adve.... public void ShowAd(string link) { linkFromservices = \"http://ads.diadiem.com/www/delivery/afr.php?refresh=10&zoneid=66&...

In my application, i use webbrowser control.

#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

in this link "http://ads.diadiem.com/www/delivery/afr.php?refresh=10&zoneid=66&..." you can see refesh=10 . Every 10 seconds the browser will automatically refresh and change the current advertising alone by random.....

but refresh the memory in开发者_运维百科creased from 200KB to 400KB.

how to release or clear History webbrowser in window phone 7 ?

Thank you all ! please help me.......


The webbrowser controle for WP7 is unable to clear history, you need to create your own webbrowser :

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

0

精彩评论

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