On Dec 17, 9:05 pm, shapper <mdmo...@gmail.comwrote:
Hello,
How can I get the ID (primary key) of a record just inserted in a
database table by a LinqDataSource?
Thanks,
Miguel
Handle the LinqDataSource's Inserted event and get the Result property
from the event args:
protected void MyLinqDataSource_Inserted(object sender,
LinqDataSourceStatusEventArgs e)
{
Whatever thing = (Whatever)e.Result;
//id is in: thing.<idcolumn>
}
-Michael Placentra II