Making a text file in ASP?
Any suggestions are eagerly welcomed
Please reply me fast as probable.
What steps will be desired.
If you are having any suggestions then reply me.
Thanks in advance.
Making a text file in ASP?
Any suggestions are eagerly welcomed
Please reply me fast as probable.
What steps will be desired.
If you are having any suggestions then reply me.
Thanks in advance.
The ASP Methods
Download ASP.NET from Microsoft download site and install. Import a file class called System.IO namespace (See "Syntax" Section) that gives static way for interrelate with files. Make an example of StreamWriter object. This will proceed as a file pointer. Appeal to "CreateText" method of an object known as "File." This will make a path of the file to be generated.
The Syntax
Stir up your expansion application (Adobe Dreamweaver or VB), choose "ASP Code" and stick the code under:
<%@ 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 makes file called "myfile.txt". Make sure that section ("\path\") references a actual path on your hard drive wherever text is near be stored.
Bookmarks