Click or drag to resize
MimeKit

HtmlUtilsHtmlAttributeEncode(TextWriter, String, Int32, Int32, Char) Method

Encode an HTML attribute value.

Namespace: MimeKit.Text
Assembly: MimeKit (in MimeKit.dll) Version: 4.3.0
Syntax
C#
public static void HtmlAttributeEncode(
	TextWriter output,
	string value,
	int startIndex,
	int count,
	char quote = '"'
)

Parameters

output  TextWriter
The TextWriter to output the result.
value  String
The attribute value to encode.
startIndex  Int32
The starting index of the attribute value.
count  Int32
The number of characters in the attribute value.
quote  Char  (Optional)
The character to use for quoting the attribute value.
Exceptions
ExceptionCondition
ArgumentNullException

output is null.

-or-

value is null.

ArgumentOutOfRangeExceptionstartIndex and count do not specify a valid range in the value.
ArgumentExceptionquote is not a valid quote character.
Remarks
Encodes an HTML attribute value.
See Also