On 27 Oct, 11:45, guy <g...@discussions.microsoft.comwrote:
have a Placeholder on whch a dynamically add controls at run tme, TextBox
DropDownList or CheckBox. I can populate these and providing I save the
placeholder n the SessionState etc. clear them etc.
However if I type into a dynamically added TextBox I can find no way of
getting at the text n code.
Any ideas?
Guy
Hi Guy
I was faced with a similar situation. My solution was to give the
dynamically added controls a unique code in the ID field and store
them in Session state. On postback any changes to content are shown in
the Request.Header list (a dictionary list of events and control
states in the form (client_ID, value)) against the client_ID
(allocated by the server except that underscore characters are
replaced with $). Although client_ID is not under the programmers
control it will have a construction based on the ID property and will
have the special code embedded within it. You'll then need to use
string search functions to identify it in the list of controls stored
in Session state.
HTH