Open In App

ASP TextStream.Close Method

Last Updated : 03 Mar, 2021
Comments
Improve
Suggest changes
Like Article
Like
Report

The ASP TextStream.Close Method is a predefined method of the TextStream Object which is used to close an opened text file. 

Syntax:

TextStreamObject.Close 

Example: Below code illustrates the ASP close Method. 

ASP




<%
dim gfg,f
set gfg=Server.CreateObject("Scripting.FileSystemObject")
// creating the file
set f=gfg.CreateTextFile("e:\Geeks.txt",true)
// Add content 
f.WriteLine("Hello Geeks")
//close the file
f.Close
Response.write("File is closed")
set f=nothing
set gfg=nothing
%>


Output:

File is closed


Next Article

Similar Reads