Hi,
I have an app that has an ASPX form with multiples of a User Control. As part of that User Control, there is a Remove button which I wanted to use to delete the information from the database.
However, because all the ASPX stuff is done first and therefore all the User Controls are created BEFORE running the code for the Remove button (inside just one of the UC), the page has effectively been painted so even though the code in the Remove button will delete the database entry correctly, the page still displays the deleted UC as it was painted first.
What options are open to me?
I have thought of 2; somehow forcing a page refresh from within the Remove code in the UC or having to create each Remove button on the ASPX form alongside each instance of the UC and therefore having to create a dynamic Event_Handler for each button.
Has anybody else got any suggestions?
Cheers,
Woody.
I have an app that has an ASPX form with multiples of a User Control. As part of that User Control, there is a Remove button which I wanted to use to delete the information from the database.
However, because all the ASPX stuff is done first and therefore all the User Controls are created BEFORE running the code for the Remove button (inside just one of the UC), the page has effectively been painted so even though the code in the Remove button will delete the database entry correctly, the page still displays the deleted UC as it was painted first.
What options are open to me?
I have thought of 2; somehow forcing a page refresh from within the Remove code in the UC or having to create each Remove button on the ASPX form alongside each instance of the UC and therefore having to create a dynamic Event_Handler for each button.
Has anybody else got any suggestions?
Cheers,
Woody.