|
Evaluates the provided C# expression and returns a string from the evaluation.
Example usage:
1.
[[CODE:
return "Hello world";
]]
The above code token returns the string "Hello World" when executed
2.
[[CODE:
return "[FORM:fname]";
]]
The above code token returns the value from the "fname" field element
3.
[[CODE:
string firstName = "[FORM:fname]";
string lastName = "[FORM:lname"];
string fullName = firstName + " " + lastName;
if (fullName.length < 10)
return "Your full name is too short";
else
return "Your full name is valid";
]]
The above code function checks if the first and last name obtained from two form fields contain at least 10 characters.
Requirements:
1. Code expression must be valid C# syntax and is case sensitive
2. The code expression must end with a "return" call.
3. The returned data type must be of type String i.e. return "string value";
4. The code token only reference "System and System.Web" assemblies. Thus reference calls to other assemblies will result in errors
TIP:
1. New line can be added inside the Code token
2. Single bracket tokens such as Form, Database Query tokens can be included inside the Code token
|