Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

You're partially right -- the dynamically added controls don't exist anymore after the postback. They won't get re-added until the DataBound event is run. The problem is that Databinding events happen after control events, that is, after your button's Click event. So, at the point in the page lifecycle where the click event is handled, those controls haven't been recreated yet.

Here's a related question which might have some useful informationHere's a related question which might have some useful information.

You're partially right -- the dynamically added controls don't exist anymore after the postback. They won't get re-added until the DataBound event is run. The problem is that Databinding events happen after control events, that is, after your button's Click event. So, at the point in the page lifecycle where the click event is handled, those controls haven't been recreated yet.

Here's a related question which might have some useful information.

You're partially right -- the dynamically added controls don't exist anymore after the postback. They won't get re-added until the DataBound event is run. The problem is that Databinding events happen after control events, that is, after your button's Click event. So, at the point in the page lifecycle where the click event is handled, those controls haven't been recreated yet.

Here's a related question which might have some useful information.

Source Link
Brant
  • 15.4k
  • 15
  • 83
  • 117

You're partially right -- the dynamically added controls don't exist anymore after the postback. They won't get re-added until the DataBound event is run. The problem is that Databinding events happen after control events, that is, after your button's Click event. So, at the point in the page lifecycle where the click event is handled, those controls haven't been recreated yet.

Here's a related question which might have some useful information.