Integrating C# code into a WebSQL Expression
You can integrate C# code into every Web SQL expression. This can be either a C# expression or a command string.
To integrate a C# expression into a Web SQL expression, enclose it in double curly brackets, as in the example:
To integrate a C# expression into a Web SQL expression
NOTE: More complex commands are also enclosed in double curly brackets. The return value of the embedded expression is labeled with the keyword @return.
To integrate multiple C# expressions into a Web SQL expression
NOTE: The keyword @return must always be the last command in the embedded expression in this case.
Access to environmental data
The following statistical member variables are defined in all classes that can be modified by code. You can use these to gain access to the runtime environment.
Table 62: Member variables overview
||Form on which the code is run|
||Module in which the code is run.|
||Actual database connection|
The generated Microsoft .NET Framework code creates a structure of ASP.NET controls. A local variable is defined for each control. The name of this variable corresponds to the identifier given to the Web Designer node.
The local variable can be accessed directly from within the same method.
Furthermore, all controls coming from the base class System.Web.UI.Control have an identifier (ID), which also corresponds to the Web Designer node identifier. This makes it easier to locate controls outside the visible range of the local variable.
Data values can be loaded from or changed in collections using C# code.
Local collections of a module or component are defined in the component's TableStore.
NOTE: Virtual collections must use a slightly different call. Virtual collections are member variable of the class and can be accessed directly from the C# code using their name.