ASP Write() Method
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 w3wiki)</p> ") %> |
Example 2:
ASP
<% name= "w3wiki" 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 w3wiki" ) f f.close set f=nothing set fs=nothing %> |
Output
Hello w3wiki
Contact Us