views:

381

answers:

1

Hi, I would need to display certain images and text in c# winforms application, so I decided to use webBrowser. Both images and text are retrieved from the database. However, I dont know how to combine them in the document creation. Thank you!

A: 

Besides nobugz's suggestion, you can implement IMoniker on an object that exposes your data as mht (web archive) and use IE document's IPersistMoniker interface to load from your object. http://www.codeproject.com/KB/miscctrl/csEXWB.aspx is an example for this interface. The benefit of using IMoniker over IStream is that you can specify a base URL for your document.

Sheng Jiang 蒋晟