Sandra Jain replied to theiry henry
12-Aug-10 03:01 AM
Write a function like this in code behind:
Private Sub ShowMessage(ByVal type As String, ByVal Message As String)
ScriptManager.RegisterStartupScript(Me, Me.GetType(), type, "<script>alert('" & Message & "');</script>", False)
End Sub
Now whereever you handle it just call this function and pass your custom message like this:
ShowMessage("error", "Foreign key violated")