Generating a text file in ASP?
Any suggestions are welcomed
Please reply me fast as possible.
What can I do?
If you are having any suggestions then answer.
Thanks.
Generating a text file in ASP?
Any suggestions are welcomed
Please reply me fast as possible.
What can I do?
If you are having any suggestions then answer.
Thanks.
The ASP Methods
Download ASP.NET from the Microsoft download site and install. Import a file class called System.IO namespace that offer static methods for interrelate with files. Generate an example of the StreamWriter object. This will proceed as a file pointer. Raise the "CreateText" method of an object called "File." This creates a path of the file to be generated.
The Syntax
Fire up your development application (Adobe Dreamweaver or VB), choose "ASP Code" and stick the code below:
<%@ Import Namespace= "System.IO" %>
Dim me As StreamWriter
Try
Me= File.CreateText (Server. MapPath ("\path\") & "myfile.txt")
End Try
End Sub
Save the file.
The over code formulate a file known as "myfile.txt". Make sure that the division (“\path\”) references an actual path on hard drive where text is to be kept.
Bookmarks