|
Question : Get return value from ObjectDataSource
|
|
Given the following code how would I get the return value from InsertData():
TypeName = "MyNamespace.MyObject" InsertMethod = "InsertData">
I would like to be able to say something like the following in my code-behind:
Sub SomeGridView_DataBound(s As Object, e As EventArgs) Dim intId As Integer intId = ObjectDataSource1.SelectParameters(0).ReturnValue End Sub
This obviously doesn't work, but hopefully you see what I'm trying to do here.
Thank you!
|
|
Answer : Get return value from ObjectDataSource
|
|
Try this:
Sub ObjectDataSource1_Inserted(s As Object, e As ObjectDataSourceStatusEventArgs) Dim intId As Integer intId = e.OutputParameters("Return") End Sub
|
|
|