Author: nwallaq | Posted on: 6/23/2010 12:58:58 PM | Views : 373

try to insert record with duplicate id, error fine but this page!
how to handle it, i cant put try catch around form view control.
note:- want to handle it and also display the error as we do in response.write(e.message) in catch...



Server Error in '/' Application. Violation of PRIMARY KEY constraint 'PK_Table_1'. Cannot insert duplicate key in object 'dbo.Table_1'.
The statement has been terminated. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint 'PK_Table_1'. Cannot insert ...

Go to the complete details ...