SPHttpUtility.UrlPathEncode - Méthode (String, Boolean, Boolean, Boolean)

Encode la partie chemin d'accès d'une URL pour une transmission HTTP fiable du serveur Web à un client.

Espace de noms :  Microsoft.SharePoint.Utilities
Assembly :  Microsoft.SharePoint (dans Microsoft.SharePoint.dll)

Syntaxe

'Déclaration
Public Shared Function UrlPathEncode ( _
    urlToEncode As String, _
    allowHashParameter As Boolean, _
    encodeUnicodeCharacters As Boolean, _
    rfcCompliant As Boolean _
) As String
'Utilisation
Dim urlToEncode As String
Dim allowHashParameter As Boolean
Dim encodeUnicodeCharacters As Boolean
Dim rfcCompliant As Boolean
Dim returnValue As String

returnValue = SPHttpUtility.UrlPathEncode(urlToEncode, _
    allowHashParameter, encodeUnicodeCharacters, _
    rfcCompliant)
public static string UrlPathEncode(
    string urlToEncode,
    bool allowHashParameter,
    bool encodeUnicodeCharacters,
    bool rfcCompliant
)

Paramètres

  • allowHashParameter
    Type : System.Boolean

    True pour autoriser les paramètre de hachage ; Sinon, false.

  • rfcCompliant
    Type : System.Boolean

    Rendre le codage d'URL conforme à RFC 3986 ? La valeur True à l'exception de compatibilité de code existant.

Valeur renvoyée

Type : System.String
L'URL codée. Vide si le paramètre urlToEncode est empty et null si le paramètre urlToEncode est null.

Voir aussi

Référence

SPHttpUtility classe

SPHttpUtility - Membres

UrlPathEncode - Surcharge

Microsoft.SharePoint.Utilities - Espace de noms