SPEncode.WriteHtmlEncodePreserveSpaces method
Encodes the specified string so that characters in embedded HTML tags are displayed as text in the browser and writes the string to the HTTP output content stream, but preserves multiple spaces within the string.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Shared Sub WriteHtmlEncodePreserveSpaces ( _
response As HttpResponse, _
str As String _
)
'Usage
Dim response As HttpResponse
Dim str As StringSPEncode.WriteHtmlEncodePreserveSpaces(response, _
str)
public static void WriteHtmlEncodePreserveSpaces(
HttpResponse response,
string str
)
Parameters
response
Type: System.Web.HttpResponseThe System.HttpResponse object for the current HTTP request.
str
Type: System.StringThe string to encode.
Remarks
The WriteHtmlEncodePreserveSpaces method converts characters that can be confused with HTML tags to entities. For example, "<" is converted to "<".