Export (0) Print
Expand All

ExpressionBuilder.EvaluateExpression Method

When overridden in a derived class, returns an object that represents an evaluated expression.

Namespace: System.Web.Compilation
Assembly: System.Web (in system.web.dll)

public virtual Object EvaluateExpression (
	Object target,
	BoundPropertyEntry entry,
	Object parsedData,
	ExpressionBuilderContext context
)
public Object EvaluateExpression (
	Object target, 
	BoundPropertyEntry entry, 
	Object parsedData, 
	ExpressionBuilderContext context
)
public function EvaluateExpression (
	target : Object, 
	entry : BoundPropertyEntry, 
	parsedData : Object, 
	context : ExpressionBuilderContext
) : Object
Not applicable.

Parameters

target

The object containing the expression.

entry

The object that represents information about the property bound to by the expression.

parsedData

The object containing parsed data as returned by ParseExpression.

context

Contextual information for the evaluation of the expression.

Return Value

An object that represents the evaluated expression; otherwise, a null reference (Nothing in Visual Basic) if the inheritor does not implement EvaluateExpression.

If you want your ExpressionBuilder object to be active on a page that supports the no-compile feature, you can override the EvaluateExpression method and the SupportsEvaluate property. The EvaluateExpression method should return the evaluation of the current expression.

Notes to Inheritors: If you override the EvaluateExpression method, you must also override the SupportsEvaluate property.

The following code example demonstrates how to use the overridden EvaluateExpression method to return an evaluated expression.

public override object EvaluateExpression(object target, BoundPropertyEntry entry, 
object parsedData, ExpressionBuilderContext context)
{
    return GetEvalData(entry.Expression, target.GetType(), entry.Name);
}

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

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft