private void writeViewData(string path, string data) { path = Server.MapPath("~/" + path); using (StreamWriter outfile = new StreamWriter(path)) { outfile.Write(data); outfile.Close(); } }