Imports System;
Imports System.CodeDom;
Imports System.Web.Compilation;
Imports System.Web.UI;

<ExpressionPrefix("MyCustomExpression")> _
<ExpressionEditor("MyCustomExpressionEditor")> _
Public Class MyCustomExpression
    Inherits ExpressionBuilder

    Public Overrides Function _
        GetCodeExpression(ByVal entry As BoundPropertyEntry, _
            ByVal parsedData As Object, ByVal context As ExpressionBuilderContext) _
            As System.CodeDom.CodeExpression

        Return New CodeCastExpression("Int64", 
            new CodePrimitiveExpression(pasedData))
    End Function

    Public Overrides Function ParseExpression _
        (ByVal expression As String, ByVal propertyType As Type, _
            ByVal context As ExpressionBuilderContext) As Object

        Return expression
    End Function
End Class
