Solved

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

Posted on 2009-07-10
3
695 Views
Last Modified: 2012-05-07
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
Comment
Question by:ronin83
3 Comments
 
LVL 41

Accepted Solution

by:
guru_sami earned 500 total points
ID: 24832246
Did you try calling explicitly DataList1.DataBind() after the record deletion inside the buttonClick?
Can you share some code....
0
 

Author Comment

by:ronin83
ID: 25007595
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

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now