This document is provided on an "AS IS" basis without warranties of any kind. Smartsite iXperion class libraries may change in future releases.
Returns the value if it is not empty, the defaultValue otherwise.

Namespace: Smartsite.Runtime.Modules
Assembly:  Smartsite.Runtime.Modules (in Smartsite.Runtime.Modules.dll)

Syntax

C#Copy imageCopy Code
[(IsDeterministic = true)]
public static string IfEmpty(
	string value,
	string defaultValue
)
Visual Basic (Declaration)Copy imageCopy Code
<(IsDeterministic := True)> _
Public Shared Function IfEmpty ( _
	value As , _
	defaultValue As  _
) As 

Parameters

value
String
The string that is tested.
defaultValue
String
The default value that is returned when the value is empty.

Return Value

String containing the value if it is not empty, otherwise the specified defaultValue.

See Also

Advanced