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 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242
|
<?xml version="1.0" encoding="utf-8"?>
<Type Name="FormViewInsertedEventArgs" FullName="System.Web.UI.WebControls.FormViewInsertedEventArgs">
<TypeSignature Language="C#" Value="public class FormViewInsertedEventArgs : EventArgs" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.EventArgs</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="T:System.Web.UI.WebControls.FormView" /> control raises the <see cref="E:System.Web.UI.WebControls.FormView.ItemInserted" /> event when an Insert button (a button with its CommandName property set to "Insert") within the control is clicked, but after the <see cref="T:System.Web.UI.WebControls.FormView" /> control inserts the record. This allows you to provide an event-handling method that performs a custom routine, such as checking the results of an insert operation, whenever this event occurs.</para>
<para>A <see cref="T:System.Web.UI.WebControls.FormViewInsertedEventArgs" /> object is passed to the event-handling method, which allows you to determine the number of records affected and any exceptions that might have occurred. To determine the number of records affected by the insert operation, use the <see cref="P:System.Web.UI.WebControls.FormViewInsertedEventArgs.AffectedRows" /> property. Use the <see cref="P:System.Web.UI.WebControls.FormViewInsertedEventArgs.Exception" /> property to determine whether any exceptions occurred. You can also indicate whether the exception was handled in the event-handling method by setting the <see cref="P:System.Web.UI.WebControls.FormViewInsertedEventArgs.ExceptionHandled" /> property. If you need to access the values of the inserted record, use the <see cref="P:System.Web.UI.WebControls.FormViewInsertedEventArgs.Values" /> property.</para>
<para>By default, the <see cref="T:System.Web.UI.WebControls.FormView" /> control returns to the mode specified by the <see cref="P:System.Web.UI.WebControls.FormView.DefaultMode" /> property after an insert operation. If an exception occurs during the insert operation, you can keep the <see cref="T:System.Web.UI.WebControls.FormView" /> control in insert mode by setting the <see cref="P:System.Web.UI.WebControls.FormViewInsertedEventArgs.KeepInInsertMode" /> property to true.</para>
<para>For more information about handling events, see <format type="text/html"><a href="01e4f1bc-e55e-413f-98c7-6588493e5f67">Consuming Events</a></format>.</para>
<para>For a list of initial property values for an instance of the <see cref="T:System.Web.UI.WebControls.FormViewDeletedEventArgs" /> class, see the <see cref="M:System.Web.UI.WebControls.FormViewInsertedEventArgs.#ctor(System.Int32,System.Exception)" /> constructor.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Provides data for the <see cref="E:System.Web.UI.WebControls.FormView.ItemInserted" /> event.</para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public FormViewInsertedEventArgs (int affectedRows, Exception e);" />
<MemberType>Constructor</MemberType>
<Parameters>
<Parameter Name="affectedRows" Type="System.Int32" />
<Parameter Name="e" Type="System.Exception" />
</Parameters>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use this constructor to initialize a new instance of the <see cref="T:System.Web.UI.WebControls.FormViewInsertedEventArgs" /> class.</para>
<para>The following table shows the initial property values for an instance of <see cref="T:System.Web.UI.WebControls.FormViewInsertedEventArgs" />.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Property </para>
</term>
<description>
<para>Initial value </para>
</description>
</item>
</listheader>
<item>
<term>
<para>
<see cref="P:System.Web.UI.WebControls.FormViewInsertedEventArgs.AffectedRows" />
</para>
</term>
<description>
<para>The value of the <paramref name="affectedRows" /> parameter.</para>
</description>
</item>
<item>
<term>
<para>
<see cref="P:System.Web.UI.WebControls.FormViewInsertedEventArgs.Exception" />
</para>
</term>
<description>
<para>The <see cref="T:System.Exception" /> object contained in the <paramref name="e" /> parameter.</para>
</description>
</item>
<item>
<term>
<para>
<see cref="P:System.Web.UI.WebControls.FormViewInsertedEventArgs.ExceptionHandled" />
</para>
</term>
<description>
<para>Initialized to false.</para>
</description>
</item>
<item>
<term>
<para>
<see cref="P:System.Web.UI.WebControls.FormViewInsertedEventArgs.KeepInInsertMode" />
</para>
</term>
<description>
<para>Initialized to false.</para>
</description>
</item>
</list>
<block subset="none" type="note">
<para>This constructor is used primarily by control developers when raising events.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.FormViewInsertedEventArgs" /> class.</para>
</summary>
<param name="affectedRows">
<attribution license="cc4" from="Microsoft" modified="false" />The number of rows affected by the insert operation.</param>
<param name="e">
<attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.Exception" /> that represents the exception raised when the insert operation was performed. If no exception was raised, use null for this parameter.</param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="AffectedRows">
<MemberSignature Language="C#" Value="public int AffectedRows { get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="P:System.Web.UI.WebControls.FormViewInsertedEventArgs.AffectedRows" /> property to determine the number of records affected by the insert operation. This property is commonly used to verify that the correct number of records was inserted in the following situations:</para>
<list type="bullet">
<item>
<para>Verify that only a single record was inserted. Sometimes an improperly written insert statement can insert multiple records.</para>
</item>
<item>
<para>Verify that a record was inserted when an error occurs during the insert operation that does not raise an exception.</para>
</item>
<item>
<para>Verify that a record was inserted when a data source control that supports conflict detection (optimistic concurrency), such as the <see cref="T:System.Web.UI.WebControls.SqlDataSource" /> and <see cref="T:System.Web.UI.WebControls.ObjectDataSource" /> controls, has its <see cref="P:System.Web.UI.WebControls.SqlDataSource.ConflictDetection" /> property set to the ConflictOptions.CompareAllValues enumeration value. Under this setting, a record that has the same key value as a record by another user concurrently might not be inserted.</para>
</item>
</list>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the number of rows affected by the insert operation.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Exception">
<MemberSignature Language="C#" Value="public Exception Exception { get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Exception</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="P:System.Web.UI.WebControls.FormViewInsertedEventArgs.Exception" /> property to determine the exception (if any) that was raised during the insert operation. If no exceptions were raised, this property returns null.</para>
<block subset="none" type="note">
<para>If an exception was raised and you decide to handle the exception in the event handler, be sure to set the <see cref="P:System.Web.UI.WebControls.FormViewInsertedEventArgs.ExceptionHandled" /> property to true; otherwise, the <see cref="T:System.Web.UI.WebControls.FormView" /> control re-throws the exception.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the exception (if any) that was raised during the insert operation.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="ExceptionHandled">
<MemberSignature Language="C#" Value="public bool ExceptionHandled { set; get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>When an exception is raised during the insert operation, use the <see cref="P:System.Web.UI.WebControls.FormViewInsertedEventArgs.ExceptionHandled" /> property to indicate whether the exception was handled in the event handler. When this property is set to true, the exception is considered handled and is not re-thrown. If this property is set to false, the <see cref="T:System.Web.UI.WebControls.FormView" /> control re-throws the exception. To determine which exception was raised, use the <see cref="P:System.Web.UI.WebControls.FormViewInsertedEventArgs.Exception" /> property.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets or sets a value indicating whether an exception that was raised during the insert operation was handled in the event handler.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="KeepInInsertMode">
<MemberSignature Language="C#" Value="public bool KeepInInsertMode { set; get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>By default, the <see cref="T:System.Web.UI.WebControls.FormView" /> control returns to the mode specified by the <see cref="P:System.Web.UI.WebControls.FormView.DefaultMode" /> property. Use the <see cref="P:System.Web.UI.WebControls.FormViewInsertedEventArgs.KeepInInsertMode" /> property to specify whether the <see cref="T:System.Web.UI.WebControls.FormView" /> control should remain in insert mode after an insert operation. To keep the <see cref="T:System.Web.UI.WebControls.FormView" /> control in insert mode, set this property to true.</para>
<block subset="none" type="note">
<para>This property should be used only when a situation occurs (such as an exception being raised) that requires the control to behave differently than it normally would. If the <see cref="T:System.Web.UI.WebControls.FormView" /> control needs to remain in insert mode by default, set the <see cref="P:System.Web.UI.WebControls.FormView.DefaultMode" /> property instead.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets or sets a value indicating whether the <see cref="T:System.Web.UI.WebControls.FormView" /> control should remain in insert mode after an insert operation.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Values">
<MemberSignature Language="C#" Value="public System.Collections.Specialized.IOrderedDictionary Values { get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Collections.Specialized.IOrderedDictionary</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use the <see cref="P:System.Web.UI.WebControls.FormViewInsertedEventArgs.Values" /> property to access the values of the fields for the inserted record. For example, you can use these values to keep a log of inserted records.</para>
<para>The <see cref="P:System.Web.UI.WebControls.FormViewInsertedEventArgs.Values" /> property returns an <see cref="T:System.Collections.Specialized.OrderedDictionary" /> object that implements the <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> interface. The <see cref="T:System.Collections.Specialized.OrderedDictionary" /> object contains <see cref="T:System.Collections.DictionaryEntry" /> objects that represent the fields of the inserted record. To access the field names, use the <see cref="P:System.Collections.Specialized.OrderedDictionary.Keys" /> property of the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> object. Similarly, you can access the field values by using the <see cref="P:System.Collections.Specialized.OrderedDictionary.Values" /> property.</para>
<block subset="none" type="note">
<para>As a shortcut, you can also use the indexer of the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> object to access the field values directly. The advantage in using the indexer is that it returns field values directly. Data source controls that rely on the field order (such as <see cref="T:System.Web.UI.WebControls.AccessDataSource" />) can access field values only by index.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets a dictionary that contains the field name/value pairs for the inserted record.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
</Members>
</Type>
|