Skip to content
Related Articles

Related Articles

Improve Article

ASP Write() Method

  • Last Updated : 05 Apr, 2021

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 j.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



My Personal Notes arrow_drop_up
Recommended Articles
Page :