HtmlTextWriter.WriteStyleAttribute 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.
Writes a style attribute and its value to the output stream.
Overloads
WriteStyleAttribute(String, String, Boolean) |
Writes the specified style attribute and value to the output stream, and encodes the value, if specified. |
WriteStyleAttribute(String, String) |
Writes the specified style attribute to the output stream. |
WriteStyleAttribute(String, String, Boolean)
Writes the specified style attribute and value to the output stream, and encodes the value, if specified.
public:
virtual void WriteStyleAttribute(System::String ^ name, System::String ^ value, bool fEncode);
public virtual void WriteStyleAttribute (string name, string value, bool fEncode);
abstract member WriteStyleAttribute : string * string * bool -> unit
override this.WriteStyleAttribute : string * string * bool -> unit
Public Overridable Sub WriteStyleAttribute (name As String, value As String, fEncode As Boolean)
Parameters
- name
- String
The style attribute to write to the output stream.
- value
- String
The value assigned to the style attribute.
- fEncode
- Boolean
true
to encode the style attribute and its assigned value; otherwise, false
.
Remarks
The WriteStyleAttribute method writes the style attribute in the following form:
name
=
value
;
The HtmlAttributeEncode method is used to encode the value
parameter.
See also
Applies to
WriteStyleAttribute(String, String)
Writes the specified style attribute to the output stream.
public:
virtual void WriteStyleAttribute(System::String ^ name, System::String ^ value);
public virtual void WriteStyleAttribute (string name, string value);
abstract member WriteStyleAttribute : string * string -> unit
override this.WriteStyleAttribute : string * string -> unit
Public Overridable Sub WriteStyleAttribute (name As String, value As String)
Parameters
- name
- String
The style attribute to write to the output stream.
- value
- String
The value assigned to the style attribute.
Remarks
The WriteStyleAttribute method writes the style attribute in the following form:
name
=
value
;
See also
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應