如何设置Content-Type的WebBrowser控件的? [英] How to set Content-Type of a Webbrowser Control?

查看:164
本文介绍了如何设置Content-Type的WebBrowser控件的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以设置内容类型的文档在WebBrowser控件?

Is it possible to set the Content-Type of a document in a webbrowser control?

例如我怎么能显示出使用DocumentText呈现为XML的web浏览器控件的XML文档?

For example how can I show an XML document rendered as XML in a webbrowser control by using DocumentText?

推荐答案

尝试添加扩展到您的的IMoniker :: GetDisplayName 实施。这将导致URL标记来看HKEY_CLASSES_ROOT下。?? ?键了解MIME类型。然后,你可以使用<一个href="http://msdn.microsoft.com/en-us/library/system.windows.forms.htmldocument.domdocument%28v=VS.90%29.aspx"相对=nofollow>网页浏览器的documen 的 IPersistMoniker接口来加载绰号

Try add an extension to your IMoniker::GetDisplayName implementation. This will cause the URL moniker to look under HKEY_CLASSES_ROOT.??? keys for mime types. Then you can use the webbrowser's documen's IPersistMoniker interface to load the moniker.

这篇关于如何设置Content-Type的WebBrowser控件的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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