Solved

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

Posted on 2009-07-10
3
705 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

929 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

8 Experts available now in Live!

Get 1:1 Help Now