2009-08-07 19 views
1

私は、ファイルをページのHTMLマークアップを持っているWebBrowserコントロールにモックデータを追加

webBrowser = new WebBrowser(); 
webBrowser.Navigate("File.html"); 

WebBrowserコントロールを作成しています。私はhtmlファイルに挿入したいモックデータをいくつか持っています。それを行う方法はありますか?モックデータはhtmlファイルのコントロールとバインドされます。

答えて

0
IHTMLTxtRange txt = (IHTMLTxtRange)Document.selection.createRange(); 
txt.pasteHTML(HtmlString); 

どこ

public IHTMLDocument2 Document 
{ 
     get 
     { 
      return webBrowser.Document as IHTMLDocument2; 
     } 
} 
関連する問題