Hi there,
Sorry about the WHERE clause. Copy and paste issue.
It doesn't matter wether your columns contain null or not. The fix I suggested doesn't look at the columns, it sees if the
actual parameters are null, which is the case when the text boxes are empty. Notice the syntax compares @textbox1 with null, not column1.
However, I left one thing out: you need to add CancelSelectOnNullParameter="False" to the SqlDataSource.
Otherwise, the SqlDataSource won't fire its query when one of the boxes is empty.
HtH,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of
ASP.NET 2.0 Instant Results and
Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out
this post.