title: How To Create New Line In txt File
body: <p>in my web page i am using two textboxes to add record in a text file.
  but the problem is that every time when i insert new record,previous record in the text file automatically delete,and the text file contains only the current record.
  kindly help me fix this issue.
  Thanks.</p>
  
  <pre><code>        &lt;asp:TextBox ID="txt1" runat="server"&gt;&lt;/asp:TextBox&gt;&lt;br /&gt;
          &lt;asp:TextBox ID="txt2" runat="server"&gt;&lt;/asp:TextBox&gt;&lt;br /&gt;
          &lt;asp:Button ID="btn" runat="server" Text="save" OnClick="btn_Click" /&gt;
  </code></pre>
  
  <p>and my code behind is like this</p>
  
  <pre><code> protected void btn_Click(object sender, EventArgs e)
      {
          TextWriter tw = new StreamWriter(Server.MapPath("date.txt"));
          tw.WriteLine(txt1.Text + txt2.Text + System.DateTime.Now);
          tw.Close();
      }
  </code></pre>