HtmlTextWriter.WriteStyleAttribute Method (String, String, Boolean)

Writes the specified style attribute and value to the output stream, and encodes the value, if specified.

Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)

public:
virtual void WriteStyleAttribute (
	String^ name, 
	String^ value, 
	bool fEncode
)
public void WriteStyleAttribute (
	String name, 
	String value, 
	boolean fEncode
)
public function WriteStyleAttribute (
	name : String, 
	value : String, 
	fEncode : boolean
)
Not applicable.

Parameters

name

The style attribute to write to the output stream.

value

The value assigned to the style attribute.

fEncode

true to encode the style attribute and its assigned value; otherwise, false.

The WriteStyleAttribute method writes the style attribute in the following form:

name = value ;

The HtmlAttributeEncode method is used to encode the value parameter.

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

Community Additions

ADD
Show: