i am creating a winform and i want to display several tables in html. I have read up and the webbrowser seems to be the way to do this. I have managed to print out the tables once, however, the second time i try to update the webbrowser it just goes blank. The html in the webbrowser changes on the event of a combo box. I dont understand why it works the first time, but not the second and why are there no errors I would be grateful for any feedback, thankyou, Simon Graham
Code:
private
void workoutPrintCombo_SelectedIndexChanged(object sender, EventArgs e){
object empty = System.Reflection.Missing.Value;
axWebBrowser1.Navigate(
"about:blank", ref empty, ref empty, ref empty, ref empty);mshtml.
IHTMLDocument2 doc = axWebBrowser1.Document as mshtml.IHTMLDocument2;doc.clear();
doc.writeln(createHTMLcode());
doc.close();
}
Note i found this code on
http://ryanfarley.com/blog/archive/2004/12/23/1330.aspx - it is not my own