i have a form view after inserting record i want to know the last id of inserted record
+2
A:
Hello there. You have to rely on your Datasource object. If you're using an EntityDataSource for instance, it's pretty easy. 1 Catch the event EntityDataSource1_Inserted(object sender, EntityDataSourceChangedEventArgs e) 2 There just Cast the entity that has been modified to your business entity. Let's say your entity is of type Persons. Then you should have in C# : var person = (Persons)(e.Entity); Of course, your entity does have a primary Key. Should it be ID, then you just call person.ID. That's it. Hope this helps, or at least, provides you with where you have to go next in solving your issue.
MrKhal
2010-06-15 20:12:00