Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.
Protected Sub gv_OnRowDeleting(ByVal sender As Object, ByVal e As GridViewDeleteEventArgs) Try Catch ex As System.Data.SqlClient.SqlException some delete code here... Would expect a reference to the standard Gridview delete process somehow... If ex.Number = 547 Then 'handle foreign key violation(547) lblMsg.Text = "Record cannot be deleted as it is being used by other tables." End If End Try End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.