<asp:SqlDataSource ID="SqlDataSource1" ……> <SelectParameters> <asp:Parameter Direction="Output" Name="TimeStamp" Type="DateTime" /> <asp:Parameter Direction="ReturnValue" Name="ReturnValue" Type="Int32" /> </SelectParameters> </asp:SqlDataSource> |
Protected Sub ObjectDataSource1_Selected(ByVal sender As Object, ByVal e As ObjectDataSourceStatusEventArgs) Response.Write("Record Count: " & Server.HtmlEncode(e.OutputParameters("totalCount"))) End Sub Protected Sub ObjectDataSource1_Updated(ByVal sender As Object, ByVal e As ObjectDataSourceStatusEventArgs) Response.Write("Rows Affected: " & Server.HtmlEncode(e.ReturnValue) & "<br/>") End Sub <asp:ObjectDataSource ID="ObjectDataSource1" ……> <UpdateParameters> <asp:Parameter Name="ContactName" Type="String" /> </UpdateParameters> <SelectParameters> <asp:Parameter Direction="Output" Name="totalCount" Type="Int32" /> </SelectParameters> </asp:ObjectDataSource> |
Protected Sub SqlDataSource1_Inserted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceStatusEventArgs) Response.Write("Record Inserted: " & Server.HtmlEncode(e.Command.Parameters("@ContactID").Value) & "<br/>") End Sub <asp:SqlDataSource ID="SqlDataSource1" ……> …… <InsertParameters> <asp:Parameter Name="contactName" Type="String" /> <asp:Parameter Direction="Output" Name="contactID" Type="Int32" /> </InsertParameters> </asp:SqlDataSource> |