Hi there,
Yes, you can do that, like this:
1. First, set CancelSelectOnNullParameter on the SqlDataSource to False so it still executes the query even if the GenreId parameter is null.
2. Then update the SQL statement to it queries all records when the @GenreId parameter is null:
Code:
SelectCommand="SELECT [Id], [Title], [Authorized], [CreateDateTime] FROM [Review] WHERE ([GenreId] = @GenreId OR @GenreId IS NULL)"
This way, when there is no selected Genre, .NET will pass null for @GenreId, causing all records to be returned.
Hope this helps,
Imar