Rohit pandarkar

Rohit pandarkar

  • NA
  • 1
  • 1.1k

How do i write the user input from my form into text file

Jun 13 2014 6:06 AM
i want the text file created by this code to send to server by using mail as i provided email code in my CS file
i used following code but its not enough
 
using (StreamWriter sw = new StreamWriter(@"D:\text.txt"))
{
sw.WriteLine("Name = " + txt_name.Text);
sw.WriteLine("Address = " + txt_ContctNo.Text);
}
 
using this it doesnt create new text file .manually u have to create it first

Answers (2)