<% Dim MLS MLS = Request.Querystring("MLS") if MLS <> "" then if Request.Form("btndelete") = "Delete Note" then Dim strPath Dim objFSO Dim objFolder strPath = "../notes/" Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Set objFolder = objFSO.GetFolder(Server.MapPath(strPath)) If objFSO.FileExists(Server.MapPath("../notes/" & MLS & "oh.txt" )) Then objFSO.deletefile(Server.MapPath("../notes/" & MLS & "oh.txt" )) end if Set objItem = Nothing Set objFolder = Nothing Set objFSO = Nothing Response.Redirect ("addmlsopenhouse.asp") end if Dim MyTextFile, MyFileObj Set MyFileObj = Server.CreateObject("Scripting.FileSystemObject") Set MyTextFile = MyFileObj.CreateTextFile(Server.MapPath("../notes/" & MLS & "oh.txt"), 1, 0) MyTextFile.Writeline (Replace(Request.Form("city"), " ", "+") & "|" & Replace(Request.Form("street"), " ", "+") & "|" & Request.Form("state") & "|" & Request.Form("zip") & "|" & Request.Form("time") & "|" & Request.Form("notes")) MyTextFile.Close Set MyFileObj = Nothing Response.Redirect ("enteropenhouse.asp?MLS=" & MLS) else Response.Redirect ("login.asp") end if %>