Skip to main content
A newer version of this page is available. .

ASPxClientTokenBox.SetText(text) Method

Sets the token texts, separated with a sign, specified by the ASPxTokenBox.TextSeparator property.

Declaration

SetText(
    text: string
): void

Parameters

Name Type Description
text string

A string value that is the token texts separated with a text separator.

Remarks

Use the SetText property to set a string containing editor token texts, separated with a sign specified by the ASPxTokenBox.TextSeparator property.

To get the token text, use the ASPxClientTokenBox.GetText method.

Note

  • The SetText method HTML encodes the specified text.
  • Tokens in a collection must be unique, so adding a token with text which is already contained in the collection, does nothing.

Example

ASPxTokenBox_SetGetText

//this code results in an image above
myToken.SetText('naomi.moreno@example.net;heidi.lopez@example.net;jessie.she@example.net');

//now the GetText() method returns the initial string
See Also