D
danielhamd
Hello,
I'm having a problem with getting dynamic controls to work the way I
want. Here a breakdown of my situation:
1. A user adds some information. This information is added as an
object to the ViewState.
2. On Page_Load event all added objects are retrieved from the
ViewState and rendered onto the page. A 'remove' button is also added
for each object which fires is wired up for a postback.
3. When a user clicks on remove, step 2 happens, then the remove
event is fired. Therefore, the object is actually removed from the
ViewState, but it still is rendered onto the page. If you refresh the
page, it will show as gone, but not until you refresh.
So does anyone have any suggestions on how I can tweak the order that
these things occur in order for it to work? I have to have the remove
buttons created in Page_Load otherwise their events will never fire,
but if the event fires, that means the button has already been created
even if it's about to be deleted.
Thanks,
Daniel
I'm having a problem with getting dynamic controls to work the way I
want. Here a breakdown of my situation:
1. A user adds some information. This information is added as an
object to the ViewState.
2. On Page_Load event all added objects are retrieved from the
ViewState and rendered onto the page. A 'remove' button is also added
for each object which fires is wired up for a postback.
3. When a user clicks on remove, step 2 happens, then the remove
event is fired. Therefore, the object is actually removed from the
ViewState, but it still is rendered onto the page. If you refresh the
page, it will show as gone, but not until you refresh.
So does anyone have any suggestions on how I can tweak the order that
these things occur in order for it to work? I have to have the remove
buttons created in Page_Load otherwise their events will never fire,
but if the event fires, that means the button has already been created
even if it's about to be deleted.
Thanks,
Daniel