how to write html by C# without using ASP.net?

  • Thread starter Thread starter Linda Chen
  • Start date Start date
L

Linda Chen

I am creating a dll to convert a structure to html. Since
this is not an asp.net web service so I can not use
HtmlTextwriter.

Any one knows any other toll I ca n use to easily create a
html file?

Thanks.

Linda Chen
 
I had to do something similar.

I had a directory with about 100 various html files in it and I wanted to
have each of these be a link
from the main page.

Rather than typing out all of those <a href="file1.htm">first file</a> <a
href="file2.htm">second file</a> ...

I wrote a program to loop thru the folders of the directory and to write all
of the HTML to an output file
(i.e. my .htm).

does that make any sense?
 
I am creating a dll to convert a structure to html. Since
this is not an asp.net web service so I can not use
HtmlTextwriter.

I have not used the HtmlTextWriter class myself, but a quick glance at the
docs suggests that it could be used without an ASP.NET context. For
example, if you wish to write to a file, try wrapping a FileStream in a
StreamWriter, and provide that to HtmlTextWriter's constructor.

Good luck,

-Derek
 
Back
Top