Click or drag to resize
ValidationHelperGetCodeName Method (Object, String, Int32, Boolean, Boolean, String, Boolean)
Gets the code name created from the given string.

Namespace: CMS.Helpers
Assembly: CMS.Helpers (in CMS.Helpers.dll) Version: 11.0.0
Syntax
C#
public static string GetCodeName(
	Object name,
	string replacement = null,
	int maxLength = 0,
	bool useUnicode = true,
	bool removeDiacritics = true,
	string allowedCharacters = null,
	bool useCamelCase = true
)

Parameters

name
Type: SystemObject
Display name
replacement (Optional)
Type: SystemString
Replacement string for invalid characters
maxLength (Optional)
Type: SystemInt32
Maximal length of the codename
useUnicode (Optional)
Type: SystemBoolean
If true, Unicode letters are allowed in the codename, otherwise only a-Z are allowed
removeDiacritics (Optional)
Type: SystemBoolean
If true, diacritics is removed from Latin characters
allowedCharacters (Optional)
Type: SystemString
Characters which should be allowed within the current name
useCamelCase (Optional)
Type: SystemBoolean
If true, camel case is used for the code name

Return Value

Type: String
See Also