C# Functions
Integrating with Visual Editor
The return type of an inline or external C# function influences whether the function will be available in Visual Editor (Visual mode of the page editor) in the Select Function dialog.
Figure 18: C# Function available in Source Editor
C# functions are always available in Source Editor (source code mode of the page editor).
To make a C# function also available for insertions from Visual Editor, too, make sure that its return value is of one of these types:
- Composite.Core.Xml.XhtmlDocument
- System.Web.UI.Control
Figure 19: C# Function available in Visual Editor
For information about using Composite.Core.Xml.XhtmlDocument in C# functions, please see “XHTML and C# Functions”.
For information about System.Web.UI.Control, please see “Control Class”.