Try this code.
Use $(this).val() instead of if ($(this).text("Hide Selection Criteria")
$(function () {
$("#<%=btnSearch.ClientID %>").click(function () {
$("#dv").slideToggle(500);
if ($(this).val() == "Hide Selection Criteria") {
$(this).html('Show Selection Criteria');
}
else if ($(this).val() == "Show Selection Criteria") {
$(this).html('Hide Selection Criteria');
alert("bbbb");
}
return false;
});
});