Get Returned object from ObjectDataSource
Posted on: Fri Nov 20 17:34:19 -0800 2009. Updated on: Fri Nov 20 17:53:23 -0800 2009.
Category: DotNet
Category: DotNet
If you have a function that returns a value and is called by an ObjectDataSource, ie Insert or Update, you can use this to get the returned value from the function
// define the OnInserted function of the object data source in the aspx side.
protected void ObjectDataSourceProduct_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
{
ProductId = (int)e.ReturnValue;
Response.Redirect("EditProduct.aspx?productId=" + ProductId.ToString());
}