Solved

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

Posted on 2009-07-10
3
792 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

617 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