asp.net Pager TemplatePagerField

March 12, 2009 17:42 by tim

Been working with the new ASP.net pager control and i must say I'm impressed

when it was all .net framework 2.0, we'd been working with a nice little usercontrol which handled all it's postback internally and we had pretty good control over the markup.  Then .net 3.5 comes on the scene with it's listview and pager, so we thought we should give them a go

It was a partially good experience but the lack of mark-up control was pretty limiting.  I'm not much of a front-end guy so i just plumped for the standard layout and went with that.  However, as our front-end guys show much more attention to look & feel than I do, they demanded better markup, nicer buttons, parameterised visibility, the lot basically

We saw there was a TemplatePagerField node for the datapage and http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.templatepagerfield.aspx showed us we could literally spoon any kind of controls and mark-up into it.  The server side functinalty opened my eyes to some new counters i didn't even know existed.  I was used to the listitem having a container, kind of like a row in a database, but the pagers container is actually the entire collection of rows.  Kind of obvious when i think about it as i was only ever throwing it the whole set and it did it's thang and paged the data as required.

Also, you can have any combination of fields so you can still use the standard pager ones.  i particularly like the page buttons one which gives you a link to each page so the users are not forced to keep pressing next and previous to get to the products 

check it out though.  Saved us loads of time recently :¬)


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Related posts

Comments

September 26. 2009 09:50

check it out though. Saved us loads of time recently :¬)

Tiffany Bracelets

October 3. 2009 07:27

Great post, please keep it up!

games

October 5. 2009 23:58

That's some pretty good info, I'll be sure to check it out. Thanks for the update!

Read Manga Online

Add comment


 

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

September 3. 2010 14:03

Calendar

September 2010
SuMoTuWeThFrSa
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789

Tags