Open In App
Related Articles

ASP Write() Method

Improve Article
Improve
Save Article
Save
Like Article
Like

The ASP Write() method is used to display a string as an output on the webpage. It is a predefined method of the Response and Textstream type object.

Syntax:

For response object:

Response.Write variant

For Textstream Object: 

Textstream.write(string)

Parameter Values: This method contains the value i.e variant which represents the specified string that you want to display as an Output.

Return Values: This method does not return any Values.

Example: Below code illustrates the ASP Write() Method

ASP




<%
response.write("<h1>ASP Write() Method</h2>")
response.write("
<p>Hello GeeksForGeeks)</p>
")
%>


Example 2:

ASP




<%
name="GeeksForGeeks"
Response.Write(name)
%>


Example-3: Below code illustrates the ASP Write Method. 

ASP




<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.CreateTextFile("d:\GFG.txt",true)
f.write("Hello GeeksForGeeks")
f
f.close
set f=nothing
set fs=nothing
%>


Output 

Hello GeeksForGeeks

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 16 Sep, 2021
Like Article
Save Article
Previous
Next
Similar Reads
Complete Tutorials