You seem to be confusing two separate technologies, ASP and JavaScript. ASP is an architecture for running server side code in response to HTTP requests, it can be written in a number of languages, VBScript, JScript or even Perl and others if the appropriate plug-ins are installed on the server.
To open a text file on the server you can use number of techniques. The stanadard one is the FileSystemObject. This is sometimes diaallowed by anti virus sotware and also requires that the IIS account (normally IUSR_<machinename>) has read permission on the file in question.
Let's say you have uploaded a user's text file to a folder underneath the application directory called 'uploads'. If the file name is passed by to the page via a variable called 'fileName' then use code similar to this:
Code:
var ForReading = 1;
var sFileName = Request("fileName");
if (typeof sFileName == "undefined")
{
Response.Write("Error");
Response.End();
}
var oFSO = new ActiveXObject("Scripting.FileSystemObject");
var oTS = oFSO.OpenTextFile(Server.MapPath(sFileName), ForReading );
var sFirstLine = oTS.ReadLine();
oTS.Close();
Response.Write(sFirstLine);
Response.End();
This code runs server side so needs "<% %>" tags around it.
--
Joe