PDA

Click to See Complete Forum and Search --> : Creating an HTML doc on the fly


Rocketdawg
May 4th, 2005, 07:46 AM
Hi Everyone

I'm having a bit of trouble coming up with the right question to ask (which really hinders the search efforts) :confused: But here it goes

I'd like to open an template html file, then modify the html file and finally, save it back to a directory as an html file.

Is there part of the System.IO namespace I can use? Most of what I've seen deals with .txt files.

If anyone could point me in the right direction, I'd greatly appreciate it!

Thanks

dj4uk
May 4th, 2005, 08:31 AM
An HTML file is a text file! All you need to do is change the file extension to .html but you can deal with it in exactly the same way.

Depending what you are doing it might be useful to look into the HtmlTextWriter which might help you along with modifying the HTML file.

HTH

DJ

Rocketdawg
May 4th, 2005, 08:44 AM
Doh! Sorry for being so thick. :o , but thank you for pointing out the HTMLtextwriter!

I always make things more complicated than they have to be.

Thanks again