This documentation is archived and is not being maintained.

XhtmlMobileTextWriter::WriteAttribute Method (String, String, Boolean)

Writes an attribute and its value to the current element using the provided attribute and value, and encodes the value if specified.

Namespace:  System.Web.UI.MobileControls.Adapters.XhtmlAdapters
Assembly:  System.Web.Mobile (in System.Web.Mobile.dll)

public:
virtual void WriteAttribute(
	String^ attribute, 
	String^ value, 
	bool encode
) override

Parameters

attribute
Type: System::String

The name of the attribute.

value
Type: System::String

The value for the attribute.

encode
Type: System::Boolean

If true, the value is encoded before being written.

If the value is nullptr or an empty string, no attribute is written because XHTML requires that all attributes have values.

This method is used primarily by developers of custom mobile page and control adapters.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Show: