SqlDataSourceFilteringEventArgs Class
Collapse the table of content
Expand the table of content

SqlDataSourceFilteringEventArgs Class


Provides data for the Filtering event of the SqlDataSource control.

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


public class SqlDataSourceFilteringEventArgs : CancelEventArgs


Initializes a new instance of the SqlDataSourceFilteringEventArgs class by using the specified object.


Gets or sets a value indicating whether the event should be canceled.(Inherited from CancelEventArgs.)


Gets an IOrderedDictionary object that provides access to the Parameter objects of the SqlDataSource class.


Determines whether the specified object is equal to the current object.(Inherited from Object.)


Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)


Serves as the default hash function. (Inherited from Object.)


Gets the Type of the current instance.(Inherited from Object.)


Creates a shallow copy of the current Object.(Inherited from Object.)


Returns a string that represents the current object.(Inherited from Object.)

The SqlDataSourceFilteringEventArgs class is used to pass data to the Filtering event handler of the SqlDataSource control. The ParameterValues property provides access to the filter parameter values before the filtering operation is performed. You can cancel the Select method by setting the Cancel property of the ObjectDataSourceFilteringEventArgs to true. Filtering is supported when the DataSourceMode property is set to the DataSet value.

Legacy Code Example

The following code example demonstrates how to retrieve data from the Northwind database and filter it using a FilterExpression and FilterParameters. The FilterExpression of the SqlDataSource is applied anytime the Select method is executed to retrieve data. In this example, the FilterExpression contains a placeholder for a filter parameter, which is contained in the FilterParameters collection. In the Filtering event, the filter parameter is displayed in a Label control.

Code snippet is not found. Confirm that the code snippet name 'System.Web.UI.WebControls.SqlDataSourceFiltering' is correct.

.NET Framework
Available since 2.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
© 2015 Microsoft