R
rvdnieuwenhuizen
Hi,
The problem I cannot seem to solve:
I have a page with a button control. In the On_Click eventhandler I
dynamically add one TextBox each time the button is clicked. I add the
textboxes to an update panel. I store the ID for the generated
textboxes in the Viewstate, which I use in the Panels' INIT
eventhandler to go ahead and instantiate the textboxes once again
every postback. I use the, in my opinion, old mechanism of retreiving
the textbox data by using the Request.Form[] indexer, indexing into
the collection using the textbox ID's stored in viewstate.
I know that there is the mechanism of re-loading postbackdata in the
freshly generated page class every postback. I know this happens after
the pages' control tree is rebuilt during the OnInit event of the page
itself.
My question: When I remove the Request.Form[] mechanism from my
panel_OnInit eventhandler, the filled in text in every textbox goes
lost on every postback. Can anyon tell me how to automatically re-fill
the generated textboxes(during Panel_OnInit) with the postback data
from the request ?
Many Thanks!!
The problem I cannot seem to solve:
I have a page with a button control. In the On_Click eventhandler I
dynamically add one TextBox each time the button is clicked. I add the
textboxes to an update panel. I store the ID for the generated
textboxes in the Viewstate, which I use in the Panels' INIT
eventhandler to go ahead and instantiate the textboxes once again
every postback. I use the, in my opinion, old mechanism of retreiving
the textbox data by using the Request.Form[] indexer, indexing into
the collection using the textbox ID's stored in viewstate.
I know that there is the mechanism of re-loading postbackdata in the
freshly generated page class every postback. I know this happens after
the pages' control tree is rebuilt during the OnInit event of the page
itself.
My question: When I remove the Request.Form[] mechanism from my
panel_OnInit eventhandler, the filled in text in every textbox goes
lost on every postback. Can anyon tell me how to automatically re-fill
the generated textboxes(during Panel_OnInit) with the postback data
from the request ?
Many Thanks!!