Bind Gridview using LINQ.

Rajesh_Kumar
Posted by Rajesh_Kumar under ASP.NET category on | Points: 40 | Views : 1128
 var query = from c in Employee_tbl
where c.Name == "Rajesh"
orderby c.Created_by descending
select new { c.FirstName, c.LastName, c.Address,c.Phone_no,c.supervisor };
Gridview1.DataSource = query.ToList();
Gridview1.DataBind();

Comments or Responses

Login to post response