RazorPage.WriteTo Method

Definition

Overloads

WriteTo(TextWriter, Object)

Writes the specified value with HTML encoding to writer.

WriteTo(TextWriter, String)

Writes the specified value with HTML encoding to writer.

WriteTo(TextWriter, HtmlEncoder, Object)

Writes the specified value with HTML encoding to given writer.

WriteTo(TextWriter, Object)

Writes the specified value with HTML encoding to writer.

public:
 virtual void WriteTo(System::IO::TextWriter ^ writer, System::Object ^ value);
public virtual void WriteTo (System.IO.TextWriter writer, object value);
abstract member WriteTo : System.IO.TextWriter * obj -> unit
override this.WriteTo : System.IO.TextWriter * obj -> unit
Public Overridable Sub WriteTo (writer As TextWriter, value As Object)

Parameters

writer
TextWriter

The TextWriter instance to write to.

value
Object

The Object to write.

Remarks

values of type IHtmlContent are written using WriteTo(TextWriter, HtmlEncoder). For all other types, the encoded result of ToString() is written to the writer.

Applies to

WriteTo(TextWriter, String)

Writes the specified value with HTML encoding to writer.

public:
 virtual void WriteTo(System::IO::TextWriter ^ writer, System::String ^ value);
public virtual void WriteTo (System.IO.TextWriter writer, string value);
abstract member WriteTo : System.IO.TextWriter * string -> unit
override this.WriteTo : System.IO.TextWriter * string -> unit
Public Overridable Sub WriteTo (writer As TextWriter, value As String)

Parameters

writer
TextWriter

The TextWriter instance to write to.

value
String

The String to write.

Applies to

WriteTo(TextWriter, HtmlEncoder, Object)

Writes the specified value with HTML encoding to given writer.

public:
 static void WriteTo(System::IO::TextWriter ^ writer, System::Text::Encodings::Web::HtmlEncoder ^ encoder, System::Object ^ value);
public static void WriteTo (System.IO.TextWriter writer, System.Text.Encodings.Web.HtmlEncoder encoder, object value);
static member WriteTo : System.IO.TextWriter * System.Text.Encodings.Web.HtmlEncoder * obj -> unit
Public Shared Sub WriteTo (writer As TextWriter, encoder As HtmlEncoder, value As Object)

Parameters

writer
TextWriter

The TextWriter instance to write to.

encoder
HtmlEncoder

The HtmlEncoder to use when encoding value.

value
Object

The Object to write.

Remarks

values of type IHtmlContent are written using WriteTo(TextWriter, HtmlEncoder). For all other types, the encoded result of ToString() is written to the writer.

Applies to