Use web expressions in displays.

Technical Reference → Programming and APIs Reference → Scripting Code Library → Web Expressions


When creating displays for web deployments (Portable or HTML5 displays),  CodeBehind and expressions on the graphical elements, are compiled to .NET 10. 

This brings some incompatibilities with code created only for WPF, which are presented in this section. 


Comparing Strings

The .NET 10 compiler for VB.NET CodeBehind and embedded expressions won't accept the simplified syntax: if ( Tag.test = "ABC", .....

When you need to compare string the script.Compare() method should be used.

Displays Expressions Examples
If (string.Compare( tag.Test, "abc") == 0, "equal", "not equal")
If (string.Compare( tag.Test, "abc", true) == 0, "equal", "not equal")
If (string.Compare( tag.Test, "abc", StringComparison.OrdinalIgnoreCase) == 0, "equal", "not equal")
VB.Net CodeBehind Example
Dim s as string
If (string.Compare( @tag.Test, "abc", true) = 0) Then
   s = "equal"
Else
  s = "not equal"
Endif

C# Code Behind

If the CodeBehind is in C# (CSharp) the syntax with the direct is still accepted:  Test = "abc" 


Methods Not Available

CINT 

RND

ServiceController

Replace by calls to TK or other .NET methods


.NET and C# Version

Display code-behind and expressions are compiled once for each client type. HTML5 clients compile to .NET 10 with C# 12, and WPF clients (RichClient, SmartClient) compile to .NET Framework 4.8 with C# 7.3, so code shared by both must stay within C# 7.3. The full matrix for scripts and displays, by solution platform and FrameworX version, is in .NET to the Core, Script Compilation Target.


In this section...