using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO; public partial class FileWriter : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { StreamWriter sw; String addresses = Request["addresses"]; try { String path = Server.MapPath("userData/addresses.txt"); sw = File.AppendText(path); sw.WriteLine(addresses); sw.Close(); Response.Write('1'); } catch (Exception ex) { Response.Write('0'); } } } }