Referring to http://www.revenmerchantservices.com/page/Linq-to-Sql.aspx Filter Items into DB using Linq to SQl Create DataBaseContext objct AdventureWorksDataContext advDBc = new AdventureWorksDataContext(); var query = from entities in advDBc.Products // select entities from product where entities.Name.StartsWith("B") // This will give all products starting with B select entities; // all linq statements must end with select or groupby clauses GridView1.DataSource = query; GridView1.DataBind();
Referring to http://www.revenmerchantservices.com/page/Linq-to-Sql.aspx
where entities.Name.StartsWith("B") // This will give all products starting with B
GridView1.DataSource = query;
GridView1.DataBind();
Currently rated 5.0 by 1 people
Satalaj
I'm Satalaj.
↑ Grab this Headline Animator
Get notified when a new post is published.