Seration Seration - 1 year ago 78
ASP.NET (C#) Question

Create a html file and save in a folder

I'm making a project. I'm trying to send mail contains a html page in attachment. I m generating HTML code. Now I want to write my HTML page and save it in a folder. I checked in web and this site but didn't find the working codes.

Answer Source

something like this?

        String content = GenerateHtml();
        System.IO.File.WriteAllText(@"C:\yoursite.htm", contents);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download