1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
|
<?xml version="1.0" encoding="utf-8"?>
<Type Name="SqlDataSourceCommandEventArgs" FullName="System.Web.UI.WebControls.SqlDataSourceCommandEventArgs">
<TypeSignature Language="C#" Value="public class SqlDataSourceCommandEventArgs : System.ComponentModel.CancelEventArgs" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.ComponentModel.CancelEventArgs</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>By adding an event handler delegate to handle the <see cref="E:System.Web.UI.WebControls.SqlDataSource.Updating" />, <see cref="E:System.Web.UI.WebControls.SqlDataSource.Inserting" />, or <see cref="E:System.Web.UI.WebControls.SqlDataSource.Deleting" /> events, you can perform any additional preprocessing required or cancel the database command entirely.</para>
<para>Because the <see cref="T:System.Web.UI.WebControls.SqlDataSourceCommandEventArgs" /> class is derived from the <see cref="T:System.ComponentModel.CancelEventArgs" /> class, you can cancel a pending <see cref="T:System.Web.UI.WebControls.SqlDataSource" /> database command by setting the <see cref="P:System.ComponentModel.CancelEventArgs.Cancel" /> property to true. You can examine and manipulate the <see cref="P:System.Data.Common.DbCommand.CommandText" />, <see cref="P:System.Data.Common.DbCommand.Parameters" /> collection, and other command properties prior to running the command by accessing the <see cref="T:System.Data.Common.DbCommand" /> object exposed by the <see cref="P:System.Web.UI.WebControls.SqlDataSourceCommandEventArgs.Command" /> property.</para>
<para>The <see cref="T:System.Web.UI.WebControls.SqlDataSourceCommandEventArgs" /> class is used in the <see cref="M:System.Web.UI.WebControls.SqlDataSourceView.OnUpdating(System.Web.UI.WebControls.SqlDataSourceCommandEventArgs)" />, <see cref="M:System.Web.UI.WebControls.SqlDataSourceView.OnInserting(System.Web.UI.WebControls.SqlDataSourceCommandEventArgs)" />, and <see cref="M:System.Web.UI.WebControls.SqlDataSourceView.OnDeleting(System.Web.UI.WebControls.SqlDataSourceCommandEventArgs)" /> methods to provide access to a <see cref="T:System.Web.UI.WebControls.SqlDataSource" /> database command before it is run. The <see cref="T:System.Web.UI.WebControls.SqlDataSource" /> control exposes many events that you can handle to work with the underlying data objects during the course of a data operation. The following table lists the events and associated <see cref="T:System.EventArgs" /> and event handler classes, to better guide you to the various events that correspond to the lifecycle of a data operation using the <see cref="T:System.Web.UI.WebControls.SqlDataSource" /> control.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Event</para>
</term>
<description>
<para>EventArgs</para>
</description>
<description>
<para>EventHandler</para>
</description>
</item>
</listheader>
<item>
<term>
<para>
<see cref="E:System.Web.UI.WebControls.SqlDataSource.Selecting" /> occurs before the data is retrieved.</para>
</term>
<description>
<para>
<see cref="T:System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs" />
</para>
</description>
<description>
<para>
<see cref="T:System.Web.UI.WebControls.SqlDataSourceSelectingEventHandler" />
</para>
</description>
</item>
<item>
<term>
<para>
<see cref="E:System.Web.UI.WebControls.SqlDataSource.Inserting" />, <see cref="E:System.Web.UI.WebControls.SqlDataSource.Updating" />, <see cref="E:System.Web.UI.WebControls.SqlDataSource.Deleting" /> occur before an insert, update, or delete operation is performed.</para>
</term>
<description>
<para>
<see cref="T:System.Web.UI.WebControls.SqlDataSourceCommandEventArgs" />
</para>
</description>
<description>
<para>
<see cref="T:System.Web.UI.WebControls.SqlDataSourceCommandEventHandler" />
</para>
</description>
</item>
<item>
<term>
<para>
<see cref="E:System.Web.UI.WebControls.SqlDataSource.Selected" />, <see cref="E:System.Web.UI.WebControls.SqlDataSource.Inserted" />, <see cref="E:System.Web.UI.WebControls.SqlDataSource.Updated" />, <see cref="E:System.Web.UI.WebControls.SqlDataSource.Deleted" /> occur after the data retrieval, insert, update, or delete operations completes.</para>
</term>
<description>
<para>
<see cref="T:System.Web.UI.WebControls.SqlDataSourceStatusEventArgs" />
</para>
</description>
<description>
<para>
<see cref="T:System.Web.UI.WebControls.SqlDataSourceStatusEventHandler" />
</para>
</description>
</item>
</list>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Provides data for the <see cref="E:System.Web.UI.WebControls.SqlDataSource.Updating" />, <see cref="E:System.Web.UI.WebControls.SqlDataSource.Deleting" /> and <see cref="E:System.Web.UI.WebControls.SqlDataSource.Inserting" /> events of the <see cref="T:System.Web.UI.WebControls.SqlDataSource" /> control.</para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public SqlDataSourceCommandEventArgs (System.Data.Common.DbCommand command);" />
<MemberType>Constructor</MemberType>
<Parameters>
<Parameter Name="command" Type="System.Data.Common.DbCommand" />
</Parameters>
<Docs>
<remarks>To be added.</remarks>
<since version=".NET 2.0" />
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.SqlDataSourceCommandEventArgs" /> class, using the specified database command object.</para>
</summary>
<param name="command">
<attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.Data.Common.DbCommand" /> object that represents the cancelable <see cref="M:System.Web.UI.WebControls.SqlDataSource.Update" />, <see cref="M:System.Web.UI.WebControls.SqlDataSource.Insert" />, or <see cref="M:System.Web.UI.WebControls.SqlDataSource.Delete" /> command. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Command">
<MemberSignature Language="C#" Value="public System.Data.Common.DbCommand Command { get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Data.Common.DbCommand</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>You can handle the <see cref="E:System.Web.UI.WebControls.SqlDataSource.Updating" />, <see cref="E:System.Web.UI.WebControls.SqlDataSource.Inserting" />, or <see cref="E:System.Web.UI.WebControls.SqlDataSource.Deleting" /> event to examine and manipulate the properties of the <see cref="T:System.Data.Common.DbCommand" /> before it is run by the <see cref="T:System.Web.UI.WebControls.SqlDataSource" /> control. The connection to the underlying data source is not yet open when the event handler delegate is called. Therefore, you cannot cancel the database operation by calling the <see cref="M:System.Data.Common.DbCommand.Cancel" /> method on the <see cref="T:System.Data.Common.DbCommand" /> object directly. However, you can cancel the database operation by setting the <see cref="P:System.ComponentModel.CancelEventArgs.Cancel" /> property of the <see cref="T:System.Web.UI.WebControls.SqlDataSourceCommandEventArgs" /> to true.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the pending database command.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
</Members>
</Type>
|