I am using VB.net **(FormView and ObjectDataSource)** and Sql Server 2005.

I want to get last inserted **@@identity** in table on **FormView1\_ItemInserted**

```
Protected Sub FormView1_ItemInserted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.FormViewInsertedEventArgs) Handles FormView1.ItemInserted

End Sub

```

My issue is that I want to redirect my FormView to readonly mode after **FormView1\_ItemInserted** but for that I need to show the inserted record in readonly mode and that is only possible if I get my last inserted **@@identity**. Can you please let me know what the changes I need to do in my application, Procedures and code to achive this.

Please suggest with example code! using VB.net

Thanks.

Best Regards,
MS