A
Andy Fish
Hi,
First some background: When you databind a repeater control, the controls
within the template are given an id like Repeater1:_ctl<n>:Button1 where <n>
increments for each repeater item. If you re-bind the control later on in
the page lifecycle, the contents are re-generated with the IDs starting from
0 again.
I have written my own templated control which mostly works except that if
you DataBind it more than once, the IDs don't start from 0 the second time.
So when a control inside the template causes a postback, the postback itself
happens but the control ID is not recognised and hence the OnBubbleEvent is
not called.
Can anyone explain where the control numbers are generated and how I get
them reset to 0 again?
TIA
Andy
First some background: When you databind a repeater control, the controls
within the template are given an id like Repeater1:_ctl<n>:Button1 where <n>
increments for each repeater item. If you re-bind the control later on in
the page lifecycle, the contents are re-generated with the IDs starting from
0 again.
I have written my own templated control which mostly works except that if
you DataBind it more than once, the IDs don't start from 0 the second time.
So when a control inside the template causes a postback, the postback itself
happens but the control ID is not recognised and hence the OnBubbleEvent is
not called.
Can anyone explain where the control numbers are generated and how I get
them reset to 0 again?
TIA
Andy