SPUrlUtility.IsLegalFileName method
Validates the specified URL leaf name.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Shared Function IsLegalFileName ( _
name As String _
) As Boolean
'Usage
Dim name As String
Dim returnValue As Boolean
returnValue = SPUrlUtility.IsLegalFileName(name)
public static bool IsLegalFileName(
string name
)
Parameters
name
Type: System.StringThe leaf name to be validated.
Return value
Type: System.Boolean
Returns a Boolean value of true if the specified leaf name is valid; otherwise, this method returns false.