C# Asp.Net Gridview - Insert Update and Delete With SQL Server
Hello Friends,
Today in this video , we will learn how to Add, Update and Delete data in SQL database using ASP.net?
I just Created one Empty web Application and added one webform to it.
Here you can see database already connected with my web Application.(To see how to connect Database to web application project, please click on the above link or you can find the link in Description box)
• Connection With Database (SQL server ...
In “School” Database, I have table call Teacher.
Column Id is auto generated field and also a Primary key so we will display that on web page into the disabled Text box.
Column Name and Subject are the Text field , so for that we will use Textbox on web form.
I have some Data in ‘Teacher’ Table. So let’s Display this in Gridview First.
So, Let’s add some required controls from Toolbox likewise Textboxes/Buttons/ Gridview.
Now let’s add connection string first.
We will do some code for Add Button and run the Application. (You can see we able to add data in DB Table and also in Gridview)
Now let’s make some code for Update Button and run the Application. (You can see we able to update data in DB Table and also in Gridview)
Now let’s make some code for Delete Button and run the Application. (You can see we able to delete data in DB Table and also in Gridview)
Now let’s make code for Clear Button.
Let’s run the Application and check.
Thanks for watching this video.
Don't forget to like and Comment.
Please subscribe my channel.
Click the bell button for more videos.
Music: https://www.bensound.com