Classic ASP BasicsFor beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
' Create a filesystem object
Dim FSO
set FSO = Server.CreateObject("Scripting.FileSystemObject")
Dim Filepath
Filepath = Server.MapPath(Filename)
' Open the file
Dim TextStream
Set TextStream = FSO.openTextFile(filepath, 1, 0)
' Read the file line by line
Do While Not TextStream.AtEndOfStream
MyVal=TextStream.readline
If counter=2 then
'add this to MENU.
End if
counter=counter + 1
Loop
This works if you are trying to put the particularly the 2nd line in menu. Else you will have to go for other way of doing this.