Solved

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

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
IIS redirect 1 67
ASP.NET MVC identity 6 26
How to ensure the user enters a value in a date field in an ASP.NET application? 1 17
C# Gridview 1 29
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
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.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

776 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