Data Access BlogTips for implementing a Data Access Layer with .NET

ObjectDataSource Tips: Get output parameter after inserting

Written on October 29, 2008 by Luis Ramirez

When using the ObjectDataSource control for insert operations, you may need to retrieve output parameters from stored procedures. This article demonstrates how to access output parameters after an insert operation completes.

The Problem

After inserting a record using ObjectDataSource, you often need the newly generated ID (identity column) for further operations.

The Solution

Handle the Inserted event of the ObjectDataSource control and access the output parameters through the event arguments.

« Back to Blog