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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top