Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forcing page refresh using User Controls

Status
Not open for further replies.

Warlocks

Technical User
Jan 9, 2003
79
GB
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top