I have a table with users. I want to be able to search for a string and then return all username which contains this string. Then i want to populate a ListBox. This is what I have tried:
var varUser = (from u in dc.Users
where u.username == searchUserName
select u.username);
lbSearchResult.DataSource = varUser;
lbSearchResult.DataBind();
But when i try to search for "a" i don't get any results. It only works if i enter the full username.