I am having trouble figuring out how to get my datasource to pull a query with a where clause when it detects a query string and strip the where clause when the parameter is empty.

My datasource query and gridview work as I need them to with my querystring item "?album_id=##", but I want to get at the page without a querystring and thusly strip the where clause out of the select command and show the full query in the gridview.

I tried setting the selectcommand attribute in the .cs on page_load to the proper string if the querystring value is null and that didn't seem to overwrite the old querystring.

Any suggestions?

PHP Code:
<asp:SqlDataSource ID="sdsViewComments" runat="server" 
        
ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        
SelectCommand="SELECT album.album_name, comment.commenter_name, comment.comment_pros, comment.comment_cons, comment.rating FROM comment INNER JOIN comment_link ON comment.comment_id = comment_link.comment_id INNER JOIN album ON comment_link.album_id = album.album_id WHERE (album.album_id = @album_id_from_page)">
        <
SelectParameters>
            <
asp:QueryStringParameter Name="album_id_from_page" 
                
QueryStringField="album_id" />
        </
SelectParameters>
    </
asp:SqlDataSource
Cheers,
MAtt