如何从WebBrowserControl获取Application.type [英] How do I get Application.type from WebBrowserControl
本文介绍了如何从WebBrowserControl获取Application.type的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用网络浏览器控件。我想决定这个文件是pdf还是html文件。
所以我想访问Application.Type。但我不知道怎么做。
这就是我想要的访问预览
I am using web browser control. And I want to decide is this file pdf or html document.
So I want to acces Application.Type. But I don't know how do this.
This what I want to acces's preview
((ExtendedWebBrowser2.ExtendedWebBrowser)sender).Application.Type
我尝试了下面的代码,但它不起作用?
我该怎么办?
I tried following code but it isn't work?
How can I do?
推荐答案
I解决了我的问题
I solved my problem
dynamic tarayici_app = ((ExtendedWebBrowser2.ExtendedWebBrowser)sender).Application;
string appFormat = tarayici_app.Type;
这篇关于如何从WebBrowserControl获取Application.type的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文