T
trepac-news7385
Looong story, but here's the summary:
I'm dynamically generating a single TextBox control (always with the
same exact ID), but in a different location each time (there will be a
varying number of dynamically generated Labels before and after it).
As near as I can tell, when the control doesn't move it participates in
ViewState and it's data value persists between postbacks.
However, if it moves (there are more/fewer Labels before it than last
trip), it's data does not persist.
This surprises me. Although I don't understand ViewState on a deep
level, I thought data was persisted by the control's ID, not it's
relative position in the list of controls.
My questions:
Is ViewState data persisted by relative position, or by ID, or by some
other method?
Is it dangerous to be "moving" controls around like I am?
Is there a way to keep the data persistent (using ViewState) when the
control moves to a different location?
Thanks in advance for any help!
--Larry
I'm dynamically generating a single TextBox control (always with the
same exact ID), but in a different location each time (there will be a
varying number of dynamically generated Labels before and after it).
As near as I can tell, when the control doesn't move it participates in
ViewState and it's data value persists between postbacks.
However, if it moves (there are more/fewer Labels before it than last
trip), it's data does not persist.
This surprises me. Although I don't understand ViewState on a deep
level, I thought data was persisted by the control's ID, not it's
relative position in the list of controls.
My questions:
Is ViewState data persisted by relative position, or by ID, or by some
other method?
Is it dangerous to be "moving" controls around like I am?
Is there a way to keep the data persistent (using ViewState) when the
control moves to a different location?
Thanks in advance for any help!
--Larry