Rank: Newbie Groups: Member
Joined: 10/31/2018 Posts: 2
|
HI, I need to render raw html data in the browser but I have not been capable of implementing it yet.
I am looking for a simple solution, this is what I got so far
public partial class StoredForm : Form { //logging private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public StoredForm() { InitializeComponent(); this.webControl1.AllowDrop = false; this.webControl1.WebView.LoadCompleted += WebView1_LoadCompleted1; ; }
private void WebView1_LoadCompleted1(object sender, EO.WebBrowser.LoadCompletedEventArgs e) { log.Info("Entering loadCompleted"); throw new NotImplementedException(); }
public void WebPage(string HTML) { log.Info("Entering WebPAge"); this.webControl1.WebView.LoadHtml(HTML); log.Info("html loaded"); }
}
and also
//create formBrowser using (StoredForm formBrowser = new StoredForm()) { formBrowser.WebPage(html); log.Info("show form"); formBrowser.ShowDialog();
}
but the form is not showing. I have tried with loadHtmlAndWait but the browser is unresponsive.
Can you indicate a simple means of loading and viewing raw HTML in the web browser, please?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Why do you handle LoadCompleted event but throws an exception in it?
|