How to set Content-Type of a Webbrowser Control?

隐身守侯 提交于 2019-12-24 08:24:47

问题


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

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


回答1:


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.



来源:https://stackoverflow.com/questions/2570592/how-to-set-content-type-of-a-webbrowser-control

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!