it's mainly code that VS generated (VS2008).
Here's the chunk of relevant code for the datasource:
Code:
<asp:ObjectDataSource ID="obdsNonTVDub" runat="server"
InsertMethod="InsertNonTVDubReq" OldValuesParameterFormatString="original_{0}"
SelectMethod="GetDataByID"
TypeName="adTrackingTableAdapters.dtNonTVDubTableAdapter"
oninserted="obdsNonTVDub_Inserted1">
<SelectParameters>
<asp:querystringparameter Name="id" QueryStringField="id" Type="Int32" />
</SelectParameters>
<InsertParameters>
<asp:parameter Name="RETURN_VALUE" Direction=ReturnValue
<asp:parameter Name="TelNumber" Type="String" />
<asp:parameter Name="VDN" Type="String" />
I've tried it with and without the return parameter defined. The above code fails when i include the return parameter saying there's no method that matches, even though my insert does have a return parameter in it's parameter collection.
And my C# in trying to get the return param is:
Code:
protected void obdsNonTVDub_Inserted1(object sender, ObjectDataSourceStatusEventArgs e)
{
int x = (int)e.ReturnValue;
}
thanks