SPHttpUtility.UrlKeyValueEncode Method (String, TextWriter)

Encodes the specified URL query string key or value, and appends it to the specified output stream.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Shared Sub UrlKeyValueEncode ( _
    keyOrValueToEncode As String, _
    output As TextWriter _
)
'Usage
Dim keyOrValueToEncode As String
Dim output As TextWriterSPHttpUtility.UrlKeyValueEncode(keyOrValueToEncode, _
    output)
public static void UrlKeyValueEncode(
    string keyOrValueToEncode,
    TextWriter output
)

Parameters

  • keyOrValueToEncode
    Type: System.String

    The key or value string to be encoded.

  • output
    Type: System.IO.TextWriter

    A T:System.IO.TextWriter object that represents the output stream to which to add the encoded key or value.

Remarks

If either of the keyOrValueToEncode or output parameters is null , this method has no effect.

See Also

Reference

SPHttpUtility Class

SPHttpUtility Members

UrlKeyValueEncode Overload

Microsoft.SharePoint.Utilities Namespace