asp.net mvc - Thoughts on custom pager -


I get a list of items that I should be present on the page. I am getting the total amount of all the items and when I get the item, the result is based on how much I want and what page I want, so if I have a page size of 10 and I want page 3 I'll use GetItems 3, 10) To get the item 20-30 in the list. The results are presented in a simple table.

Now I want to add a pager tool and this is where I was stuck. If they are doing one, then I think I could use onclick = "this.form.submit (); submit and get a new set of data but how can I submit a simple one-link form To do this, not just. Set;;} Public CustomPager

  Public Class CustomPager {int PAGECOUNT}: The way I expect it to work  

I have made this class so far (integer PAGECOUNT) {PAGECOUNT = PAGECOUNT;} public string CreateH TML () {string html markup = ""; string linkMarkup = "& lt; An id = \ "page \" name = \ "page \" onclick = \ "this.form .submit (); \" & gt; {0} & lt; (For example, int i = 1; i & lt; = PAGECOUNT; i ++) {htmlMarkup + = String.Format (linkMarkup, i.ToString ());} html markup return;}} / Code>

Instead of you, using a 3rd party HTML assistant is considered?

When I started developing MVC I just started building my own pager just like you.

For the projects I have been using this 3rd party HTML Assistant with all the functionality in my Required for previous pair Ing.



Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -