GetExpression Method
Collapse the table of content
Expand the table of content

ExpressionEditorSheet.GetExpression Method

When overridden in a derived class, returns the expression string that is formed by the expression editor sheet property values.

Namespace:  System.Web.UI.Design
Assembly:  System.Design (in System.Design.dll)

public abstract string GetExpression()

Return Value

Type: System.String
The custom expression string for the current property values.

A custom expression editor sheet contains design-time settings for multiple expression properties, which are combined to form an expression string. Control property values can be set using expression strings; the expression strings are evaluated at run time by an expression builder.

The GetExpression method returns an expression string that is built from the current expression properties. The visual designer allows you to set the expression sheet properties, and then calls the GetExpression method to get the expression string and set the control property value.

Notes to Inheritors:

Derive a custom expression editor sheet from the ExpressionEditorSheet class, if you are defining a new expression type for control property values and you want to build the expression string based on multiple expression property values. A derived class implementation should contain the following:

  • A public property for each distinct value in the expression string that can be set at design time.

  • An implementation of the GetExpression method that forms the custom expression string from the editor sheet property values.

  • Optionally, a constructor implementation that sets the initial values of the editor sheet properties.

The associated custom expression editor class creates an instance of the derived editor sheet in the GetExpressionEditorSheet method, initializes that instance with the current expression string set for the control property, and then returns the instance to the visual designer. The visual designer allows you to set the expression sheet properties, and then calls the GetExpression method to form the expression string from the input expression sheet property values.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0

Community Additions

© 2016 Microsoft