Pager Web User Control
Posted on 2005-05-08
I am writing in VB.Net for an Asp.Net page.
Here is what i am trying to do.
Create a custom pager Web User Control.
I have these controls on the page:
Prev Link Button
Next Link Button
Last Link Button
Page Number DropDownList
Number Per Page DropDownList
My Stored Procedure only returns the records needed; in the order they are requested; so there is no need to do that part on the Web User Control's code behind. That work is done in the aspx code behind. I thought I could set properties in the Web User Control and that would just write out what was needed on the page such as the correct number of pages in the Page Number DropDownList and have the correct one selected or have the Last and Next LinkButtons disable if there were no more pages to go in that direction.
My thougth was that all i had to do was pass the Web User Control the:
Number Per page
Then have it do the work needed to have all the controls work properly on the Web User Control page.
I have gotten nowhere on this. Can anyone give me an example of how i can get this to work. I would like to be able to place a pager at the bottom and the top if i could with one Web User Control. The issue i see here is that the name of the controls on that Web User Control would be the same when the page loaded.