Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
8
Reply
how to delete a row in gridview
Nitin Sharma
Feb 24 2014 5:21 AM
1k
Reply
//int id = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Values[0].ToString());
//if (con.State == ConnectionState.Closed)
//{
// con.Open();
//}
//SqlCommand cmd = new SqlCommand("Delete from gridview where id='" + id + "'", con);
//cmd.ExecuteNonQuery();
//con.Close();
//GridView1.DataBind();
//display();
how can i delete a row in using row deleting event . i was used this code but its not working in the table i use identity to generate id
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
8
)
Next Recommended Forum
how to count the clicks of an image?
How to get checkbox data after form submit using c#