• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 892
  • Last Modified:

how to hide a datalist item after button click, in c# .net

I want to add a 'remove' linkbutton in the itemtemplate of a datalist, that will let the person remove the item from the database. i'd like the datalistitem, of which the user clicks remove, to dissapear seemingly real-time when they click. so the user can experience the result going away without having to refresh the page to see it missing. i'm working with c# in asp.net and am a novice.

i considered using the animationextender from the ajaxtoolkit to make the panel visible=false after click, but i'm also using a confirmbuttonextender, which asks 'are you sure you want to remove?' before following through with the button click. what happens when i use these both is that a user could click remove and the panel instantly goes away, even if they then click cancel on the confirm. so i'd rather be able to make the entry go away in the button click's c# code.
0
ronin83
Asked:
ronin83
1 Solution
 
guru_samiCommented:
Did you try calling explicitly DataList1.DataBind() after the record deletion inside the buttonClick?
Can you share some code....
0
 
ronin83Author Commented:
you can give credit to the guy who answered. his answer of databinding the datalist does have the effect required, although i ended up going another direction with this.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now