Click here to Skip to main content
15,895,667 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SQL
<asp:SqlDataSource ID="SqlDataSourceRegistration" runat="server" ConnectionString="<%$ ConnectionStrings:conStr %>"
        SelectCommand="sp_ms_person_registration_current" SelectCommandType="StoredProcedure"
        DeleteCommand="sp_ms_person_registration_delete" DeleteCommandType="StoredProcedure"
        InsertCommand="sp_ms_person_registration_add" InsertCommandType="StoredProcedure"
        UpdateCommand="sp_ms_person_registration_edit" UpdateCommandType="StoredProcedure" OnInserted="SqlDataSourceRegistration_Inserting">



SqlDataSourceRegistration.Inserting += new SqlDataSourceCommandEventHandler(SqlDataSourceRegistration_Inserting);

C#
void SqlDataSourceRegistration_Inserting(object sender, SqlDataSourceCommandEventArgs e)
      {
          throw new NotImplementedException();

      }



Still getting Error pls help me
How to handle Exception which i am getting error while i was trying to insert
Posted

1 solution

Not really sure if I understand your question correctly, but every time the Inserting event occurs and the SqlDataSourceRegistration_Inserting method is called a NotImplementedException is thrown by your code. This causes a situation that your inserts will fail.

So instead of throwing the exception replace it with the logic you need to add.
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900