Skip Navigation LinksHome > Categories > Code from a Category

Delete records in database using 3-tier architecture in asp.net with c#



User Name: codelecturer
Name: Mike Chauhan
Contact Me: www.datawebcoder.com/ContactUs.aspx
Home Page: www.datawebcoder.com
6 years of total IT experience including programming, application development, System Maintenance . 3 years of Experienced and expertise in .Net Framework VB, Visual Basic.Net, ASP.Net 2.0, 3.5 and AD... [More]
Viewed Times: 3888
Add Date: 12/07/2012
In this programming article we will learn how to delete the records in database using 3-tier architecture in asp.net with c#.
For beginners ,I strongly recommend to read this tutorial 3-Tier Architecture in asp.net using c# first to get basics of 3-tier architecture in asp.net. So let’s begin, have a look over .aspx page

image

Delete records in database using 3-tier architecture in asp.net with c#

delete-records.aspx

As you have seen, we have an asp:gridview control in our web page. We have four template fields in it, these are rollNo, firstName, lastName and Delete image to delete the records. The main thing you must have to notice is the OnRowDeleting event of gridview. Through this event we will delete the records from database. So let’s have a look over its c# code behind file.

delete-records.aspx.cs


BusStudent.cs


Happy Programming!!!

Post a Comment

Name: (Optional)
Email: (Optional, you can get an email if somebody replys your comments)*
Email me if somebody respons my comment below:
Details**:
Enter Text
as Below:
(case insensitive, if hard to read, click the "get a new one" button)
 
    
* Your email address will not be shared with any third parties for any reason.
** Maximum 1000 charactors.