Click here to Skip to main content
15,923,164 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i m create dynamically link button and label at page_load event. label display the database value and link button is to delete record from database.every label control one delete button. when i m click on delete button of specific record the record is deleted successfully but deleted record display on page. i want deleted record not to display on page .
Posted
Updated 6-Jun-12 4:08am
v2
Comments
db7uk 6-Jun-12 10:33am    
How are you handling the creation of the controls on page_load event? could you provide more information?

you can set the ID of the record to ID of your label!
then put your records in a panel or every control that can have child control!
and just after deleting the record write this to your code:
C#
Panel.Controls.Remove(label.ID);
 
Share this answer
 
I think you're talking about Gridview - Item Template - Event bubbling. If yes then just Rebind the Gridview after that delete operation. Check this tutorial for more details Updating, Deleting records using GridView control[^]
 
Share this answer
 
you need to call binding code after deleting....
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900