Data Manipulation using ListView Server Control with ASP.NET 3.5
page 1 of 10
Published: 27 Dec 2007
Abstract
In this article, Das explains how the good old data manipulation operations (such as Add/Modify/Delete) can be done using the ListView Web Server control. Apart from these, you will also learn how to give a confirmation message before we delete a row from the ListView. And finally, during editing/modifying a row from the ListView, we will see how to set the proper index for a DropDownList inside the ListView Edit Row. All these operations have been explained clearly with a live demo.
by Jesudas Chinnathampi (Das)
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 10243/ 724

Introduction

In order to use the ListView control, we need the ASP.NET 3.5 Framework. All examples mentioned in this article were created using Visual Web Developer 2008 Express Edition. You could use SQL Server 2000/2005 or the free SQL Express to try out the examples explained in this article. C# is the primary language that is being used in this article. If you are comfortable with VB, then you could use a free tool which will convert the C# code to VB.NET. This can be found by visiting the following link.


View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 7 and 7 and type the answer here:

User Comments

Title: Editnig ListView   
Name: ListView
Date: 4/23/2008 3:08:32 AM
Comment:
Unable to edit
Title: Re: Live Demo is broken   
Name: Das
Date: 2/19/2008 6:13:48 PM
Comment:
It is a bug in my code. when the record count goes to zero, the link to "add new records" is not being displayed.

I need to fix this, so that the "Add new" link / button will always show up. so, when we have zero rows, we could add new row using the "Add New" functionality.

Will modify the code accordingly.
Title: Live Demo is broken   
Name: Jason Schechter
Date: 2/19/2008 2:38:06 PM
Comment:
Nothing is coming up except the shell of the table with the column headings.
Title: ListViewItemType   
Name: Wissam Bishouty
Date: 2/19/2008 6:33:06 AM
Comment:
Greetings,
thank you for the useful article.
in the DataBoundList method you say : if (ddl != null)
but why you do not check if the listview in edit mode so if it is in edit mode so you get the reference to the dropdownlist??

Regards.
Title: Re: Could not find stored procedure 'teacher.das_get_authors'.   
Name: Das
Date: 2/17/2008 6:39:19 PM
Comment:
The stored procedure got deleted somehow. Not sure how. But I just ran the create script again and the LIVE demo is working fine again.

Thanks for letting me know about the error
Title: Broken Demo   
Name: me
Date: 2/6/2008 4:43:35 PM
Comment:
Nice....
Could not find stored procedure 'teacher.das_get_authors'.

Product Spotlight
Product Spotlight 






Ads Powered by Lake Quincy Media
Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2008 ASPAlliance.com  |  Page Processed at 5/12/2008 1:20:41 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search