Click here to Skip to main content
15,900,725 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to get exact datalist in asp.net.

i have webform in alphabetical order like below:

i am using 10 datalist to segregate like,

A-B C-D E-F G-H .......Y-Z  // thesre are link button.

this A-B contais 10 records, C-D contains 10 records like that ends up till Y-Z. i wanted show all records of a toz. so i put the coding in page load event

webform.aspx.

HTML
<table>

<tr>

<td>

firstdatalist //A-B will bind.

<td>

</tr>

<tr>

<td>

second datalist // C-D will bind.

</td>

</tr>

<tr>

<td>

third datalist //E-F will bind.

</td>

</tr>

like that i wll use tr and td till Y-Z.

</table>

when i run the program, i will get web form in browser below.

C#
A-B C-D E-F ..........Y-Z //these are link button.

A-B // Lablel just showing

A-B // datalist will show it's records ...........

C-D

C-D // datalist will show it's records.

.

.

Y-Z

Y-Z // datalist will show it's records.

Till now. everything works fine. in top, A-B C-D E-F which is link button, right? so, when if user click E-F , It has to scroll to E-F records correctly. and if user clicks M-N linkbutton, It has to go M-N records correctly.

How can i do that? help needed.

Thank you.
Posted
Updated 9-Nov-13 1:39am
v2

1 solution

Hi Xavier,

Quick google search gave me this link[^].
Just pass starting index and ending page index will solve your problem.
Hope it would help you a bit.

Regards,
RK
 
Share this answer
 
v2
Comments
christhuxavier 9-Nov-13 7:50am    
hi prabakar, Can you give example please
♥…ЯҠ…♥ 9-Nov-13 7:54am    
In link itself gives you perfect example I believe... just try that.
I suggest you to follow this programming strategy - No Pain No Gain
christhuxavier 9-Nov-13 8:01am    
Hi prabakar, i did not see that link which was my mistake. i can try now. i like your quotes - no pain no gain.
♥…ЯҠ…♥ 9-Nov-13 8:03am    
Good luck and Happy coding.... ;-)
christhuxavier 9-Nov-13 8:07am    
Thank you. i saw you link. that was paging concept. but my requirement is different. kindly read my question again. please give any example.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900