Try to use Any.
Code example:
logintestDataContext dct = new logintestDataContext();
string userName = "john";
var logintest = (from lt in dct.logintest
where lt.username.Contains(userName)
select lt
);
lblUserExist.Text = logintest.Any().ToString();
Let's explain code:
In logintestDataContext is table logintest
logintestDataContext dct = new logintestDataContext();
Using Linq, var logintest is filled from table logintest where username is like string userName (in this case john)
string userName = "john";
var logintest = (from lt in dct.logintest
where lt.username.Contains(userName)
select lt
);
If there are results in logintest, label text become true. If there are no result label text become false.
lblUserExist.Text = logintest.Any().ToString();