Share via


UrlValidator.MessagePrefix property

Gets or sets the name of object to be displayed in error messages.

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

Syntax

'Declaration
Public Property MessagePrefix As String
    Get
    Set
'Usage
Dim instance As UrlValidator
Dim value As String

value = instance.MessagePrefix

instance.MessagePrefix = value
public string MessagePrefix { get; set; }

Property value

Type: System.String

Remarks

The message for an illegal character is “{0} cannot contain any of the following characters:" # % & * : < > ? \ { } ~”

The {0} is replaced with the MessagePrefix to provide the user with context for which control or field contains the error.

Examples

“URL name cannot contain any of the following characters: " # % & * : < > ? \ { } ~”

See also

Reference

UrlValidator class

UrlValidator members

Microsoft.SharePoint.WebControls namespace