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
urlToEncode
Type : System.StringL'URL à encoder.
allowHashParameter
Type : System.BooleanTrue pour autoriser les paramètre de hachage ; Sinon, false.
- encodeUnicodeCharacters
Type : System.Boolean
rfcCompliant
Type : System.BooleanRendre 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.