Hi CNT,
Which technology do you use to achieve this purpose? According to your description, maybe it is a web application?
This forum is discussing and talking about Windows Forms, so if you use Winform and want to write to a text file, you can refer to the following code:
private void button1_Click(object sender, EventArgs e)
{
string[] lines = { textBox1.Text,textBox2.Text };
System.IO.File.WriteAllLines(@"D:\Test\WriteLines.txt", lines);
}
Best Regards,
Stanly
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to
MSDN Support, feel free to contact MSDNFSF@microsoft.com.