Generate HTML Urgent!!!!

  • Thread starter Thread starter Chris Calhoun
  • Start date Start date
C

Chris Calhoun

Does anyone know how to generate HTML or WebForms in C# Assemblies?

Thanks in advance!
 
I mean more specifically, generating HTML and Webforms from classes, and
then streaming the dynamic content to the browser. ("maybe utilizing the
ASP.NET runtime.")

Thanks.
 
Hi Chris,
use Microsoft.mshtml.dll, HTMLDocument and related classes.

Something like:

object[] oPageText = {sWebPage};
myDoc = new HTMLDocumentClass();
IHTMLDocument2 oMyDoc = (IHTMLDocument2)myDoc;
oMyDoc.write(oPageText);

The above code loads HTML stored in string var sWebPage.

You have to read about IHTMLDocument2 for using DOM elements (I.e.
dynamically add/remove/change HTML elements).

Hope that helps
Sunny
 
Back
Top