using System;
using System.IO;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
File.WriteAllText("C:\\demo.html", textBox1.Text);
}
}
}
or Use this in button click event..
StreamWriter sw = new StreamWriter("E:\\test.html");
sw.Write(textBox1.Text);
sw.Close();
Also can see it..
http://www.dotnetspider.com/resources/31161-Creating-html-file-with-text-box-data.aspx[
^]