RazorPage.WriteTo Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
WriteTo(TextWriter, Object) |
Writes the specified |
WriteTo(TextWriter, String) |
Writes the specified |
WriteTo(TextWriter, HtmlEncoder, Object) |
Writes the specified |
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.
Remarks
value
s 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.
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
.
Remarks
value
s of type IHtmlContent are written using WriteTo(TextWriter, HtmlEncoder). For all other types, the encoded result of ToString() is written to the writer
.