Hi Guy,
HtmlTextWriter looks like it could help:
using System;
using System.IO;
using System.Text;
using System.Web.UI;
public class Test
{
public static void Main()
{
StringBuilder strBldr = new StringBuilder();
StringWriter strWriter = new StringWriter(strBldr);
HtmlTextWriter writer = new HtmlTextWriter(strWriter);
//<html>
writer.RenderBeginTag(HtmlTextWriterTag.Html);
// <head>
writer.RenderBeginTag(HtmlTextWriterTag.Head);
// </head>
writer.RenderEndTag();
// <body>
writer.RenderBeginTag(HtmlTextWriterTag.Body);
writer.Write("This is text for my web page.");
// </body>
writer.RenderEndTag();
// </html>
writer.RenderEndTag();
Console.WriteLine(strBldr.ToString());
}
}
Joe
--
http://www.csharp-station.com
"guy" <wi*********@hotmail.com> wrote in message
news:Oq****************@TK2MSFTNGP10.phx.gbl...
Does .NET have a class or set of functions that facilitate the creating
and writing of html files?
I have been creating files in streams and constructing html strings and
writing them out but it seems that a class could facilitate this better.
Thanks