Javascript: Save file with ActiveXobject
===

I am working on an Asp .net project and i have a textarea in an aspx page, and i am trying to save textarea contents on a file on the server by clicking a button with the following code:

    
               var fso = new ActiveXObject("Scripting.FileSystemObject");
               var a = fso.CreateTextFile("c:\\temp1\\testfile.txt", true);
                   a.WriteLine(saveData);
               a.Close();

The issue is if the file does not exists , then it creates it. But if it exists it dodes not overwrite it. Any help pls ? (I have to mention that Localy runing the application with visual studio then it rewrites it, but it doesnt works on the published version )