M
Mike Collins
I want to allow users to search last names, using wildcards.
When I try to following in my web app:
//employees data was previously retrieved and stored in ViewState.
var filteredData = from p in employees.ToArray() select p;
filteredData = from c in employees
where SqlMethods.Like(c.Username, "%" + txtSearchCriteria.Text +
"%")
select c;
I get the following error:
Method Boolean Like cannot be used on the client it is only for translation
to SQL
Is there a way I can use Linq to get what I want and stay client side?
When I try to following in my web app:
//employees data was previously retrieved and stored in ViewState.
var filteredData = from p in employees.ToArray() select p;
filteredData = from c in employees
where SqlMethods.Like(c.Username, "%" + txtSearchCriteria.Text +
"%")
select c;
I get the following error:
Method Boolean Like cannot be used on the client it is only for translation
to SQL
Is there a way I can use Linq to get what I want and stay client side?