c# - Should I skip and take my LINQ query for grid view paging? -


i m using linq select filing gridview. gridview allow paging , page size 10;

now write query same :

var select=from res in db.tblusers select res; grdusers.datasource=select; grdusers.databind(); 

my user table has 1000 records.

should change query :

var select=(from res in db.tblusers select res).skip(pageindex).take(pagesize) 

is better or not?

you should little correction in skip function

var select=(from res in db.tblusers select res).skip(pageindex * pagesize).take(pagesize); 

and of course, should better server side paging client side paging.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -