G
Guest
To wire a Click event handler to a dynamically-added control (e.g.
LinkButton), you need to do so during the Load event of the parent (e.g. a
PlaceHolder).
The problem is, the Click event handler sets up a member variable that needs
to control how the dymanic controls are created in the first place!
Alas, I can't do so because it's already too late since the Load event fires
before the Click event.
Wiring the Click event handler during the PreRender event of the parent
doesn't work.
I played around with the idea of using positional static controls and
dynamically setting their Visible and Enabled properties, but it turned out
quite messy.
Is there a way to work around this problem.
I appreciate your feedback.
LinkButton), you need to do so during the Load event of the parent (e.g. a
PlaceHolder).
The problem is, the Click event handler sets up a member variable that needs
to control how the dymanic controls are created in the first place!
Alas, I can't do so because it's already too late since the Load event fires
before the Click event.
Wiring the Click event handler during the PreRender event of the parent
doesn't work.
I played around with the idea of using positional static controls and
dynamically setting their Visible and Enabled properties, but it turned out
quite messy.
Is there a way to work around this problem.
I appreciate your feedback.