A
aeden.jameson
I have a drop-down list the I want to use to control the visibility of
button fields. Here's an example of one of my button fields,
<asp:ButtonField Visible='<%$ Code:ddlReason.SelectedValue =
Status.Review %>' CommandName="Review" Text="Review" />
The value of ddlReason.SelectedValue within the custom expression is
constant even if I select another value from the dropdown. Why does
this occur?
The code for the custom expression builder is,
<ExpressionPrefix("Code")> _
Public Class CodeExpressionBuilder
Inherits ExpressionBuilder
Public Overrides Function GetCodeExpression(ByVal Entry As
System.Web.UI.BoundPropertyEntry, ByVal ParsedData As Object, ByVal
Context As System.Web.Compilation.ExpressionBuilderContext) As
System.CodeDom.CodeExpression
Return New CodeSnippetExpression(Entry.Expression)
End Function
End Class
Cheers,
Aeden
button fields. Here's an example of one of my button fields,
<asp:ButtonField Visible='<%$ Code:ddlReason.SelectedValue =
Status.Review %>' CommandName="Review" Text="Review" />
The value of ddlReason.SelectedValue within the custom expression is
constant even if I select another value from the dropdown. Why does
this occur?
The code for the custom expression builder is,
<ExpressionPrefix("Code")> _
Public Class CodeExpressionBuilder
Inherits ExpressionBuilder
Public Overrides Function GetCodeExpression(ByVal Entry As
System.Web.UI.BoundPropertyEntry, ByVal ParsedData As Object, ByVal
Context As System.Web.Compilation.ExpressionBuilderContext) As
System.CodeDom.CodeExpression
Return New CodeSnippetExpression(Entry.Expression)
End Function
End Class
Cheers,
Aeden