Share via


SPHttpUtility.UrlPathEncode method (String, Boolean, TextWriter)

Encodes the specified path part of a URL for HTTP transmission, and appends it to the specified output stream.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Shared Sub UrlPathEncode ( _
    urlToEncode As String, _
    allowHashParameter As Boolean, _
    output As TextWriter _
)
'Usage
Dim urlToEncode As String
Dim allowHashParameter As Boolean
Dim output As TextWriterSPHttpUtility.UrlPathEncode(urlToEncode, _
    allowHashParameter, output)
public static void UrlPathEncode(
    string urlToEncode,
    bool allowHashParameter,
    TextWriter output
)

Parameters

  • urlToEncode
    Type: System.String

    A string that contains the path.

  • allowHashParameter
    Type: System.Boolean

    true to specify that the decode operation can include a hash parameter; otherwise, false.

  • output
    Type: System.IO.TextWriter

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

Remarks

This method calls the UrlPathEncode(String, Boolean, Boolean, TextWriter) method with the urlToEncode, allowHashParameter, false, and output.

See also

Reference

SPHttpUtility class

SPHttpUtility members

UrlPathEncode overload

Microsoft.SharePoint.Utilities namespace