2025-04-27 07:49:33 -04:00

103 lines
4.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
<TITLE>Write</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
TempString = navigator.appVersion
if (navigator.appName == "Microsoft Internet Explorer"){
// Check to see if browser is Microsoft
if (TempString.indexOf ("4.") >= 0){
// Check to see if it is IE 4
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/coua.css">');
}
else {
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/cocss.css">');
}
}
else if (navigator.appName == "Netscape") {
// Check to see if browser is Netscape
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/coua.css">');
}
else
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/cocss.css">');
//-->
</script>
<SCRIPT LANGUAGE="VBScript">
<!--
Sub Window_OnLoad()
Dim frmContents
On Error Resume Next
If Not Parent Is Nothing Then
Set frmContents = Parent.Contents
If Not frmContents Is Nothing Then
frmContents.Window.TOCSynch_Click
End If
End If
End Sub
//--></SCRIPT><META NAME="DESCRIPTION" CONTENT="Internet Information Services reference information">
<META HTTP-EQUIV="PICS-Label" CONTENT='(PICS-1.1 "<http://www.rsac.org/ratingsv01.html>" l comment "RSACi North America Server" by "inet@microsoft.com <mailto:inet@microsoft.com>" r (n 0 s 0 v 0 l 0))'>
<META NAME="MS.LOCALE" CONTENT="EN-US">
<META NAME="MS-IT-LOC" Content="Internet Information Services">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H4><A NAME="_write"></A><SUP></SUP>Write</H4>
<P>The <B>Write </B>method writes a specified string to the current HTTP output.</P>
<H6>Syntax</H6>
<P><B>Response.Write </B><I>variant</I></P>
<P><I>&nbsp;</I></P>
<H6>Parameters</H6>
<DL>
<DT><I>variant</I></DT>
<DD>The data to write. This parameter can be any data type supported by the Visual Basic Scripting Edition VARIANT data type, including characters, strings, and integers. This value cannot contain the character combination %&gt;; instead you should use the escape sequence %\&gt;. The Web server will translate the escape sequence when it processes the script.</DD>
</DL>
<H6>Notes</H6>
<P>If you do not want to use the default language codepage, output from Response.Write can be encoded using different codepages by setting @CodePage, Response.CodePage, Session.CodePage, or the AspCodePage metabase property. For more information, see <A HREF="/iishelp/iis/htm/asp/vbob150l.htm"><B>CodePage</B></A> and <A HREF="/iishelp/iis/htm/asp/vbob7fw4.htm"><B>Charset</B></A>.</P>
<H6>Example</H6>
<P>The following example use the <B>Response.Write</B> method and plain HTML to send output to the client. </P>
<PRE><CODE>&lt;H3 align=center&gt;I just want to say &lt;% Response.Write "Hello World.&lt;/H3&gt;&lt;BR&gt;" %&gt;
Your name is: &lt;% Response.Write Request.QueryString("name") %&gt; &lt;BR&gt;
</CODE></PRE>
<P>The following example uses &lt;%= instead of Response.Write.</P>
<PRE><CODE>The date is: &lt;%= Date %&gt; &lt;BR&gt;
</CODE></PRE>
<P>The following example adds an HTML tag to the Web page output. Because the string returned by the <B>Write </B>method cannot contain the character combination %&gt;, the escape %\&gt; has been used instead. The following script</P>
<PRE><CODE>&lt;% Response.Write "&lt;TABLE WIDTH = 100%\&gt;" %&gt;
</CODE></PRE>
<P>produces the output</P>
<PRE><CODE>&lt;TABLE WIDTH = 100%&gt;
</CODE></PRE>
<H6>Applies To</H6>
<P><A HREF="/iishelp/iis/htm/asp/vbob5sj8.htm"><B>Response</B> Object</A> </P>
<H6>See Also</H6>
<P><A HREF="/iishelp/iis/htm/asp/vbob2rxh.htm"><B>BinaryWrite</B></A>, <A HREF="/iishelp/iis/htm/asp/vbob7fw4.htm"><B>Charset</B></A>, <A HREF="/iishelp/iis/htm/asp/vbob150l.htm"><B>CodePage</B></A>.</P>
<hr class="iis" size="1">
<p align="center"><em><a href="../../../common/colegal.htm">&copy; 1997-2001 Microsoft Corporation. All rights reserved.</a></em></p>
</BODY>
</HTML>