The problem is very stupid but I really can't find a solution.
My code is:
code:
var fso = new ActiveXObject("Scripting.FileSystemObject");
ts = fso.OpenTextFile(filepath, 1); //filepath does not contains errors
ssvar = "The file contains: \n\n";
var line = "";
while(!ts.AtEndOfStream)
{
line = ts.ReadLine();
if (line != "")
{
ssvar = ssvar + line; //This WONT work, how to concatenate strings??
Debug.Trace(line); //THIS trace correctly fires the line's text
}
}
ts.Close();
Debug.Trace(ssvar);//THIS trace WONT display anything but "The file contains: \n\n"
As you can see this code is a piece of cake.. but I really can't figure out why it simply doesn't work. I've tried with ReadAll function but that function won't even read the file. The file is in ASCII text format and is less than 1 KB. Does not contains strange characters.
Help me please