My select new statement get values from two different tables but it does not data bind in the grid view please help.
var search = (from u in db.Users
` join s in db.Sites on u.SiteID equals s.SiteID`
where u.FirstName.Contains(tbSearch.Text.Trim())
select new
{
u.FirstName,
u.LastName,
u.Username,
u.Password,
s.SiteName,
u.Active
});
if (search != null)
{
rgUsers.DataSource = search;
rgUsers.DataBind();
Result : Displays not values in the gridiew.
Note : When I change my select new statement to "select u" it returns all the values except the s.sitename which is from another table.