<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/asp-net-datapager-not-paging-after-first-postback--bc6oyfkkw" -->

---
title: ASP.NET DataPager not paging after first PostBack?
description: A classroom training problem with an ASP.NET page containing a DataList and DataPager: clicking a page number in the pager requires two clicks to actually...
canonical: https://daily.dev/posts/asp-net-datapager-not-paging-after-first-postback--bc6oyfkkw
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: ASP.NET DataPager not paging after first PostBack? | daily.dev
og:description: A classroom training problem with an ASP.NET page containing a DataList and DataPager: clicking a page number in the pager requires two clicks to actually...
og:url: https://daily.dev/posts/asp-net-datapager-not-paging-after-first-postback--bc6oyfkkw
og:image: https://api.daily.dev/og/posts/Bc6OYFKKW.png
og:image:alt: ASP.NET DataPager not paging after first PostBack?
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# ASP.NET DataPager not paging after first PostBack?

**[Maarten Balliauw](https://daily.dev/sources/maartenballiauw)** · 2 min read · 0 upvotes · 0 comments

## Summary

A classroom training problem with an ASP.NET page containing a DataList and DataPager: clicking a page number in the pager requires two clicks to actually navigate, because data binding happens in Page_Load instead of PreRender. Moving the DataBind() call to the PreRender event (shown as Page_Render) fixes the issue by respecting the ASP.NET page lifecycle, where postback events like paging fire after Load but before PreRender.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.maartenballiauw.be/posts/2007-12-14-aspnet-datapager-not-paging-after-first-postback>

## Questions this post answers

### Why does my ASP.NET DataPager require two clicks before it actually changes pages?

This happens when DataBind() is called in the Page_Load event instead of PreRender. Because paging is a postback event that updates the pager's state after Load but before PreRender, binding data in Load uses the old page index, so the display only updates on the next postback. Moving the DataSource assignment to Load and calling DataBind() in the PreRender event resolves the delay.

_Developers debugging ASP.NET Web Forms paging quirks like this often compare page lifecycle fixes on daily.dev._

## Similar posts on daily.dev

- [Kendo Grid in jQuery with All Important Properties in ASP.NET MVC](https://daily.dev/posts/kendo-grid-in-jquery-with-all-important-properties-in-asp-net-mvc-lnv3dmdby) · C\# Corner · 0 upvotes · 0 comments
- [Reveal Content with the ASP.NET MVC Responsive Panel](https://daily.dev/posts/reveal-content-with-the-asp-net-mvc-responsive-panel-lzzpnnhbf) · Telerik · 0 upvotes · 0 comments
- [Best Practices for Creating User-Friendly Data Grids](https://daily.dev/posts/best-practices-for-creating-user-friendly-data-grids-mmspwwrug) · Telerik · 1 upvotes · 0 comments

---

Tags: [#aspnet](https://daily.dev/tags/aspnet), [#c#](https://daily.dev/tags/c#)

[View this post on daily.dev](https://daily.dev/posts/asp-net-datapager-not-paging-after-first-postback--bc6oyfkkw)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"ASP.NET DataPager not paging after first PostBack?","url":"https://daily.dev/posts/asp-net-datapager-not-paging-after-first-postback--bc6oyfkkw","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/asp-net-datapager-not-paging-after-first-postback--bc6oyfkkw"},"datePublished":"2026-10-04T13:06:36.531Z","dateModified":"2026-10-15T02:22:36.403Z","description":"A classroom training problem with an ASP.NET page containing a DataList and DataPager: clicking a page number in the pager requires two clicks to actually...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/55afcd19910859ed2e3095922d5e0358?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/55afcd19910859ed2e3095922d5e0358?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Maarten Balliauw","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Maarten Balliauw","logo":"https://media.daily.dev/image/upload/s--rOTg3VYO--/f_auto,q_auto/v1791119043/logos/maartenballiauw?_a=BAMAMicg0","url":"https://daily.dev/sources/maartenballiauw"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/asp-net-datapager-not-paging-after-first-postback--bc6oyfkkw","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"aspnet,c#","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Maarten Balliauw","item":"https://daily.dev/sources/maartenballiauw"},{"@type":"ListItem","position":3,"name":"ASP.NET DataPager not paging after first PostBack?"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/asp-net-datapager-not-paging-after-first-postback--bc6oyfkkw#faq","mainEntity":[{"@type":"Question","name":"Why does my ASP.NET DataPager require two clicks before it actually changes pages?","acceptedAnswer":{"@type":"Answer","text":"This happens when DataBind() is called in the Page_Load event instead of PreRender. Because paging is a postback event that updates the pager's state after Load but before PreRender, binding data in Load uses the old page index, so the display only updates on the next postback. Moving the DataSource assignment to Load and calling DataBind() in the PreRender event resolves the delay. Developers debugging ASP.NET Web Forms paging quirks like this often compare page lifecycle fixes on daily.dev."}}]}
```

