Hi folks,
I have a SqlDataSource object with the folloiwng parameters:
Code:
<SelectParameters>
<asp:ControlParameter Name="pageNum" ControlID="pn1" PropertyName="SelectedPage" />
<asp:Parameter DefaultValue="10" Name="pageSize" Type="Int32" />
<asp:Parameter Name="pageCount" Direction="ReturnValue" Type="Int32" />
</SelectParameters>
I can access the return value parameter in code with:
Code:
protected void SqlDataSource1_Selected(object sender, System.Web.UI.WebControls.SqlDataSourceStatusEventArgs e)
{
int pages;
pages = (int)e.Command.Parameters["@pageCount"].Value;
pn1.Count = pages;
Pn2.Count = pages;
}
I'm re-writing the app using business objects and ObjectDataSource controls. The ObjectDataSourceStatusEventArgs doesn't have a Command.Parameters collection. How do you access an ObjectDataSource return parameter when you business methods execute stored procedures that return values?
ObjectDataSourceStatusEventArgs has a ReturnValue property, but it references the return value of the business method (in my case a collection), not the return value of the stored procedure executed by the business method.
Any thoughts much appreciated.
Bob