This topic has not yet been rated - Rate this topic

HtmlTextWriter.Write Method (Object)

Writes the text representation of an object to the output stream, along with any pending tab spacing.

Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)
public override void Write (
	Object value
)
public void Write (
	Object value
)
public override function Write (
	value : Object
)
Not applicable.

Parameters

value

The object to write to the output stream.

The Write method generates any tabs that are pending, and then calls the Write base method.

The following code example shows how to use the Write method to render the value of the System.Globalization.CultureInfo.CurrentCulture property.

This code example generates the following markup:

This is a rendered CultureInfo object.

<bold>

The value of the CurrentCulture property:

</bold>

// Use the Write method to render an arbitrary
// object, in this case a CultureInfo object. 
writer.Write("This is a rendered CultureInfo Object.");
writer.RenderBeginTag(HtmlTextWriterTag.B);
writer.Write(CultureInfo.CurrentCulture);
writer.RenderEndTag();

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.