0

I need to write a Javascript's value in text file in my mvc5 project. Is it possible to do so?I tried the code below but didn't succeed. its not considering the "OpenTextFile" and ActiveXObject as a function. do i need to add some references for using these?

var fso = new ActiveXObject("Scripting.FileSystemObject");
var fh = fso.OpenTextFile("data.txt", 8, false, 0);
fh.WriteLine(d1 + ',' + d2);
fh.Close();
zeifi
  • 33
  • 5

0 Answers0