Last post May 21, 2011 10:51 AM by cts-mgraham
May 10, 2011 10:56 AM|ricardoschiller|LINK
I've struggled with this all day now. I just can't make it work. The idea is very simple: In the CreateChildControls method, I add a bunch of simple webcontrols to the page, and they all render properly. But then, in a partialpostback, I want to change the
text of a label.. so, in the CreateChildControls I assign a session variable to the label text, which is changed in the partialpostback. The problem is, whatever I do, no changes are reflected in the page.. I've tried EnsureChildControls and RecreateChildControls
also. No results...
It's as if once the controls are rendered the first time, whatever I do to change them, they always stay the same as the first render. I've even tried some control logic in the CreateChildControls to just not render any contents at all. But all the freckin'
controls still appear!
Please help me with this... I need to finish this urgently...
Thanks in advance!
May 11, 2011 10:34 PM|TimoYang|LINK
Your codes and point out where you've got mistakes or errors that you suspect, please:)
May 18, 2011 12:06 AM|jkirkerx|LINK
you have to create them in oninit to postback and change values
May 21, 2011 10:51 AM|cts-mgraham|LINK
Let us know if these responses have helped you. For a full understanding of why you would need to use the OnInit function, you might want to look at this post: