SqlDataSourceView.Filtering Evento
Definição
Ocorre antes de uma operação de filtragem.Occurs before a filter operation.
public:
event System::Web::UI::WebControls::SqlDataSourceFilteringEventHandler ^ Filtering;
public event System.Web.UI.WebControls.SqlDataSourceFilteringEventHandler Filtering;
member this.Filtering : System.Web.UI.WebControls.SqlDataSourceFilteringEventHandler
Public Custom Event Filtering As SqlDataSourceFilteringEventHandler
Tipo de evento
Comentários
Manipule o Filtering evento para executar operações de validação em valores de parâmetro de filtro antes que o SqlDataSourceView objeto execute uma operação de filtro.Handle the Filtering event to perform validation operations on filter parameter values before the SqlDataSourceView object performs a filter operation. Você pode cancelar o Select método definindo a Cancel Propriedade do SqlDataSourceFilteringEventArgs objeto como true .You can cancel the Select method by setting the Cancel property of the SqlDataSourceFilteringEventArgs object to true. O evento será gerado somente se a FilterExpression propriedade estiver definida.The event is raised only if the FilterExpression property is set.
Importante
Você deve validar qualquer valor de parâmetro de filtro que você recebe do cliente.You should validate any filter parameter value that you receive from the client. O tempo de execução simplesmente substitui o valor do parâmetro na expressão de filtro e o aplica ao DataView objeto retornado pelo Select método.The runtime simply substitutes the parameter value into the filter expression and applies it to the DataView object that is returned by the Select method. Se você estiver usando a FilterExpression propriedade como uma medida de segurança para limitar o número de itens retornados, você deverá validar os valores de parâmetro antes que a filtragem ocorra.If you are using the FilterExpression property as a security measure to limit the number of items that are returned, you must validate the parameter values before the filtering occurs.
Para obter mais informações sobre como lidar com eventos, consulte manipulando e gerando eventos.For more information about how to handle events, see Handling and Raising Events.