码迷,mamicode.com
首页 > Windows程序 > 详细

实现Winform端窗体关闭后刷新html网页内容

时间:2017-09-06 00:45:46      阅读:219      评论:0      收藏:0      [点我收藏+]

标签:logs   style   opened   alt   arc   分享   page   tostring   gif   

一、首先要知道刷新网页的路径;

技术分享
 1  frmPointEasyToBeat fpetBeat = new frmPointEasyToBeat(bookNoteId, userInfo.UserId);
 2                 fpetBeat.ShowDialog();
 3                 if (webBrowser1.Document?.Window?.Frames != null)
 4                 {
 5                     foreach (var iFrame in webBrowser1.Document?.Window?.Frames)
 6                     {
 7                         HtmlWindow window = (HtmlWindow)iFrame;
 8                         if (window.Url.ToString().Contains("UploadImagePage.aspx"))
 9                         {
10                             window.Document?.InvokeScript("searchPhoto", new object[] { });
11                         }
12                     }
13                 }
后端向html传递刷新消息

 

实现Winform端窗体关闭后刷新html网页内容

标签:logs   style   opened   alt   arc   分享   page   tostring   gif   

原文地址:http://www.cnblogs.com/Tcwangyu/p/7482330.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!