<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

    protected void Page_Load(object sender, EventArgs e)
    {

        System.IO.FileStream fs = 
            new System.IO.FileStream(Server.MapPath("TextFile.txt"), 
                System.IO.FileMode.Append, System.IO.FileAccess.Write, 
                System.IO.FileShare.Read, 8, System.IO.FileOptions.None);
        byte[] data = System.Text.Encoding.ASCII.GetBytes("This is an additional string");
        fs.Write(data, 0, data.Length);
        fs.Flush();
        fs.Close();
    }
</script>