Link to home
Start Free TrialLog in
Avatar of chiii0ut
chiii0utFlag for United Kingdom of Great Britain and Northern Ireland

asked on

DataGrid Paging (javascript disabled on client)

Hi Experts

Most ecommerce sites have datagrids which don't rely on the client having Javascript enabled to render pages 1-10,11-20 etc.
e.g
http://www.amazon.com/exec/obidos/tg/new-for-you/top-sellers/-/dvd/all/ref=d_hp_sn_ts/102-8831740-9295333

Can you give me a code example please?

(I'm new to ASP.NET and was disappointed when I tried the drag and drop controls to find that some rely on client Javascript.)



Avatar of Hamed Zaghaghi
Hamed Zaghaghi
Flag of Iran, Islamic Republic of image

you can use datagrid
if you use vs2005 you should use gridview,
Avatar of chiii0ut

ASKER

Erm
I'm using VS2005 gridview and onmouseover the pg no. it is calling:

javascript:__doPostBack('GridView',;Page2$')

which breaks if javascript is turned off.

Whereas onmouseover the page nos on the the amazon site you get a non-javascript page link:

http://www.amazon.com/exec/obidos/tg/new-for-you/top-sellers/-/dvd/all/dvd/0/1/2/ref=pd_ts_pg_2/102-8831740-9295333
I think the only control that would work if Javascript is disabled on the client is the buton control.
almost all controls that has postback use java script,
you can use links that send querystrings to a page  for example like this

list.aspx
shows data from 1 to 10
list.aspx?s=10
shows data from 10 to 20

and so on....
ASKER CERTIFIED SOLUTION
Avatar of DreamMaster
DreamMaster

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Max
I haven't had a chance to try it yet but it looks spot on

Paul
Avatar of DreamMaster
DreamMaster

Glad to have been helpfull Paul!

Regards,
Max.