I\'m developing an ASP.net application using Entity Framework. I\'m using DetailsView
to insert data into database. There is a table as Client
and its
This is what i'm looking for.
in partial class
protected void clientDataSource_OnInserted(object sender, EntityDataSourceChangedEventArgs e )
{
int newPrimaryKey = ((Client)e.Entity).ClientId;
Debug.WriteLine(" Client ID is " + newPrimaryKey);
}
and added below line in EntityDataSource
in aspx page.
OnInserted="clientDataSource_OnInserted"