HttpResponseBase.Write Method

Definition

Writes information to the HTTP response output stream.

Overloads

Write(Char)

Writes a character to an HTTP response output stream.

Write(Object)

Writes the specified object to the HTTP response stream.

Write(String)

Writes the specified string to the HTTP response output stream.

Write(Char[], Int32, Int32)

Writes the specified array of characters to the HTTP response output stream.

Write(Char)

Writes a character to an HTTP response output stream.

C#
public virtual void Write(char ch);

Parameters

ch
Char

The character to write to the HTTP output stream.

Exceptions

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Write(Object)

Writes the specified object to the HTTP response stream.

C#
public virtual void Write(object obj);

Parameters

obj
Object

The object to write to the HTTP output stream.

Exceptions

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Write(String)

Writes the specified string to the HTTP response output stream.

C#
public virtual void Write(string s);

Parameters

s
String

The string to write to the HTTP output stream.

Exceptions

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Write(Char[], Int32, Int32)

Writes the specified array of characters to the HTTP response output stream.

C#
public virtual void Write(char[] buffer, int index, int count);

Parameters

buffer
Char[]

The character array to write.

index
Int32

The position in the character array where writing starts.

count
Int32

The number of characters to write, starting at index.

Exceptions

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1