The Expression Editor dialog box enables you to set the Where, Order By, Group By, or Select expressions for a LinqDataSource control. You can add parameters that are used in these expressions. When setting the Where or Order By expression, you can let the LinqDataSource control automatically generate the expression, or you can manually create the expression. The Expression Editor dialog box also enables you to add parameters for Insert, Update, or Delete operations.
You access this dialog box by selecting the ellipsis button (…) in the Properties window for any one of the following:
The user interface in the Expression Editor changes, depending on which expression you set. For example, the element for manually setting the expression is named Where Expression or Order By Expression, depending on the context.
You also access this dialog box by clicking the Where or Order By button in the Configure Data Source - LinqDataSource dialog box when you have already set the LinqDataSource control to automatically generate the expression. It is also displayed if you have previously set the expression to a custom expression that cannot be supported through the other dialog boxes. You set the AutoGenerateWhereClause property to true to automatically generate the Where clause. You set the AutoGenerateOrderByClause property to true to automatically generate the Order By clause.
Enables you to manually create the Where, Order By, Group By, or Select expression. When you set the Where or Order By expression and the Automatically generate the expression based on the provided parameters check box is selected, this element is disabled. If you select the check box, any expression that you enter will be cleared. For more information about how to set the Where or Order By expression, see the Where property or the OrderBy property.
Displays existing parameters and lets you add new parameters. The table shows the name of the parameter and the syntax that is used to retrieve the parameter value. Click Add Parameter to add a new parameter.
Specifies which source to use for a parameter. The choices are None, Control, Cookie, Form, Profile, QueryString, and Session.
Each source results in a different Parameter control in the parameter collection of the LinqDataSource control, as shown in the following table: