Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
445 lines (380 sloc) 31.6 KB
<Type Name="DetailsViewUpdatedEventArgs" FullName="System.Web.UI.WebControls.DetailsViewUpdatedEventArgs">
<TypeSignature Language="C#" Value="public class DetailsViewUpdatedEventArgs : EventArgs" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit DetailsViewUpdatedEventArgs extends System.EventArgs" />
<TypeSignature Language="DocId" Value="T:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs" />
<TypeSignature Language="VB.NET" Value="Public Class DetailsViewUpdatedEventArgs&#xA;Inherits EventArgs" />
<TypeSignature Language="C++ CLI" Value="public ref class DetailsViewUpdatedEventArgs : EventArgs" />
<TypeSignature Language="F#" Value="type DetailsViewUpdatedEventArgs = class&#xA; inherit EventArgs" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.EventArgs</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Provides data for the <see cref="E:System.Web.UI.WebControls.DetailsView.ItemUpdated" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.WebControls.DetailsView> control raises the <xref:System.Web.UI.WebControls.DetailsView.ItemUpdated> event when an Update button (a button with its `CommandName` property set to "Update") within the control is clicked, but after the <xref:System.Web.UI.WebControls.DetailsView> control updates the record. This allows you to provide an event handler that performs a custom routine, such as checking the results of an update operation, whenever this event occurs.
A <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs> object is passed to the event handler, 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 update operation, use the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.AffectedRows%2A> property. Use the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.Exception%2A> property to determine whether any exceptions occurred. You can also indicate whether the exception was handled in the event handler by setting the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.ExceptionHandled%2A> property. If you need to access the key field values for the updated record, use the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.Keys%2A> property. The original and updated non-key field values can be accessed using the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.OldValues%2A> and <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.NewValues%2A> properties, respectively.
By default, the <xref:System.Web.UI.WebControls.DetailsView> control returns to the mode specified by the <xref:System.Web.UI.WebControls.DetailsView.DefaultMode%2A> property after an update operation. To keep the <xref:System.Web.UI.WebControls.DetailsView> control in edit mode, set the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.KeepInEditMode%2A> property to `true`.
For more information about how to handle events, see [Handling and Raising Events](~/docs/standard/events/index.md).
For a list of initial property values for an instance of the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs> class, see the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.%23ctor%2A> constructor.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs> object passed to the event handler for the <xref:System.Web.UI.WebControls.DetailsView.ItemUpdated> event to determine whether an exception occurred during an update operation.
[!code-aspx-csharp[DetailsViewUpdatedEventArgs#1](~/samples/snippets/csharp/VS_Snippets_WebNet/DetailsViewUpdatedEventArgs/CS/detailsviewupdatedeventargscs.aspx#1)]
[!code-aspx-vb[DetailsViewUpdatedEventArgs#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/DetailsViewUpdatedEventArgs/VB/detailsviewupdatedeventargsvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.DetailsView" />
<altmember cref="T:System.Web.UI.WebControls.DetailsViewUpdatedEventHandler" />
<altmember cref="E:System.Web.UI.WebControls.DetailsView.ItemUpdated" />
<altmember cref="P:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.AffectedRows" />
<altmember cref="P:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.Exception" />
<altmember cref="P:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.ExceptionHandled" />
<altmember cref="P:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.KeepInEditMode" />
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DetailsViewUpdatedEventArgs (int affectedRows, Exception e);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(int32 affectedRows, class System.Exception e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.#ctor(System.Int32,System.Exception)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (affectedRows As Integer, e As Exception)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; DetailsViewUpdatedEventArgs(int affectedRows, Exception ^ e);" />
<MemberSignature Language="F#" Value="new System.Web.UI.WebControls.DetailsViewUpdatedEventArgs : int * Exception -&gt; System.Web.UI.WebControls.DetailsViewUpdatedEventArgs" Usage="new System.Web.UI.WebControls.DetailsViewUpdatedEventArgs (affectedRows, e)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="affectedRows" Type="System.Int32" />
<Parameter Name="e" Type="System.Exception" />
</Parameters>
<Docs>
<param name="affectedRows">The number of rows affected by the update operation.</param>
<param name="e">An <see cref="T:System.Exception" /> that represents the exception raised when the update operation was performed. If no exception is raised, use <see langword="null" /> for this parameter.</param>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this constructor to initialize a new instance of the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs> class.
The following table shows initial property values for an instance of the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs> class.
|Property|Initial value|
|--------------|-------------------|
|<xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.AffectedRows%2A>|The value of the `affectedRows` parameter.|
|<xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.Exception%2A>|The <xref:System.Exception?displayProperty=nameWithType> object contained in the `e` parameter.|
|<xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.ExceptionHandled%2A>|Initialized to `false`.|
|<xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.KeepInEditMode%2A>|Initialized to `false`.|
> [!NOTE]
> This constructor is used primarily by control developers when raising events.
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.DetailsView" />
<altmember cref="T:System.Web.UI.WebControls.DetailsViewUpdatedEventHandler" />
<altmember cref="E:System.Web.UI.WebControls.DetailsView.ItemUpdated" />
<altmember cref="P:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.AffectedRows" />
<altmember cref="P:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.Exception" />
<altmember cref="P:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.ExceptionHandled" />
<altmember cref="P:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.KeepInEditMode" />
</Docs>
</Member>
<Member MemberName="AffectedRows">
<MemberSignature Language="C#" Value="public int AffectedRows { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 AffectedRows" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.AffectedRows" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property AffectedRows As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int AffectedRows { int get(); };" />
<MemberSignature Language="F#" Value="member this.AffectedRows : int" Usage="System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.AffectedRows" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the number of rows affected by the update operation.</summary>
<value>The number of rows affected by the update operation.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.AffectedRows%2A> property to determine the number of rows affected by the update operation. This value is commonly used to verify that the appropriate number of rows was updated.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.AffectedRows%2A> property to determine the number of rows affected by an update operation.
[!code-aspx-csharp[DetailsViewUpdatedEventArgs#1](~/samples/snippets/csharp/VS_Snippets_WebNet/DetailsViewUpdatedEventArgs/CS/detailsviewupdatedeventargscs.aspx#1)]
[!code-aspx-vb[DetailsViewUpdatedEventArgs#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/DetailsViewUpdatedEventArgs/VB/detailsviewupdatedeventargsvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.DetailsView" />
<altmember cref="T:System.Web.UI.WebControls.DetailsViewUpdatedEventHandler" />
<altmember cref="E:System.Web.UI.WebControls.DetailsView.ItemUpdated" />
<altmember cref="P:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.Exception" />
<altmember cref="P:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.ExceptionHandled" />
</Docs>
</Member>
<Member MemberName="Exception">
<MemberSignature Language="C#" Value="public Exception Exception { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Exception Exception" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.Exception" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Exception As Exception" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property Exception ^ Exception { Exception ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Exception : Exception" Usage="System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.Exception" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Exception</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the exception (if any) that was raised during the update operation.</summary>
<value>An <see cref="T:System.Exception" /> that represents the exception that was raised during the update operation.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.Exception%2A> property to determine the exception (if any) that was raised during the update operation. If no exceptions were raised, this property returns `null`.
> [!NOTE]
> If an exception was raised and you decide to handle the exception in the event handler, be sure to set the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.ExceptionHandled%2A> property to `true`; otherwise, the exception is passed to the next method on the call stack for handling.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.Exception%2A> property to determine whether an exception occurred during an update operation.
[!code-aspx-csharp[DetailsViewUpdatedEventArgs#1](~/samples/snippets/csharp/VS_Snippets_WebNet/DetailsViewUpdatedEventArgs/CS/detailsviewupdatedeventargscs.aspx#1)]
[!code-aspx-vb[DetailsViewUpdatedEventArgs#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/DetailsViewUpdatedEventArgs/VB/detailsviewupdatedeventargsvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.DetailsView" />
<altmember cref="T:System.Web.UI.WebControls.DetailsViewUpdatedEventHandler" />
<altmember cref="E:System.Web.UI.WebControls.DetailsView.ItemUpdated" />
<altmember cref="P:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.AffectedRows" />
<altmember cref="P:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.ExceptionHandled" />
</Docs>
</Member>
<Member MemberName="ExceptionHandled">
<MemberSignature Language="C#" Value="public bool ExceptionHandled { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool ExceptionHandled" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.ExceptionHandled" />
<MemberSignature Language="VB.NET" Value="Public Property ExceptionHandled As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool ExceptionHandled { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.ExceptionHandled : bool with get, set" Usage="System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.ExceptionHandled" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether an exception that was raised during the update operation was handled in the event handler.</summary>
<value>
<see langword="true" /> if the exception was handled in the event handler; otherwise, <see langword="false" />. The default is <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When an exception is raised during the update operation, use the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.ExceptionHandled%2A> 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 passed further up the call stack. If this property is set to `false`, the exception is passed to the next method on the call stack for handling. To determine which exception was raised, use the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.Exception%2A> property.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.ExceptionHandled%2A> property to indicate that the exception was handled in the event handler.
[!code-aspx-csharp[DetailsViewUpdatedEventArgs#1](~/samples/snippets/csharp/VS_Snippets_WebNet/DetailsViewUpdatedEventArgs/CS/detailsviewupdatedeventargscs.aspx#1)]
[!code-aspx-vb[DetailsViewUpdatedEventArgs#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/DetailsViewUpdatedEventArgs/VB/detailsviewupdatedeventargsvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.DetailsView" />
<altmember cref="T:System.Web.UI.WebControls.DetailsViewUpdatedEventHandler" />
<altmember cref="E:System.Web.UI.WebControls.DetailsView.ItemUpdated" />
<altmember cref="P:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.AffectedRows" />
<altmember cref="P:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.Exception" />
</Docs>
</Member>
<Member MemberName="KeepInEditMode">
<MemberSignature Language="C#" Value="public bool KeepInEditMode { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool KeepInEditMode" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.KeepInEditMode" />
<MemberSignature Language="VB.NET" Value="Public Property KeepInEditMode As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool KeepInEditMode { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.KeepInEditMode : bool with get, set" Usage="System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.KeepInEditMode" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the <see cref="T:System.Web.UI.WebControls.DetailsView" /> control should remain in edit mode after an update operation.</summary>
<value>
<see langword="true" /> to remain in edit mode after an update operation; otherwise, <see langword="false" />. The default is <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
By default, the <xref:System.Web.UI.WebControls.DetailsView> control returns to the mode specified by the <xref:System.Web.UI.WebControls.DetailsView.DefaultMode%2A> property after an update operation. Use the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.KeepInEditMode%2A> property to specify whether the <xref:System.Web.UI.WebControls.DetailsView> control should remain in edit mode. To keep the <xref:System.Web.UI.WebControls.DetailsView> control in edit mode, set this property to `true`.
> [!NOTE]
> This property should be used if you want to override the default mode at a specific occasion. If the <xref:System.Web.UI.WebControls.DetailsView> control needs to remain in edit mode by default, set the <xref:System.Web.UI.WebControls.DetailsView.DefaultMode%2A> property instead.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.KeepInEditMode%2A> property to keep a <xref:System.Web.UI.WebControls.DetailsView> control in edit mode after an update operation.
[!code-aspx-csharp[DetailsViewUpdatedEventArgs#1](~/samples/snippets/csharp/VS_Snippets_WebNet/DetailsViewUpdatedEventArgs/CS/detailsviewupdatedeventargscs.aspx#1)]
[!code-aspx-vb[DetailsViewUpdatedEventArgs#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/DetailsViewUpdatedEventArgs/VB/detailsviewupdatedeventargsvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.DetailsView" />
<altmember cref="T:System.Web.UI.WebControls.DetailsViewUpdatedEventHandler" />
<altmember cref="E:System.Web.UI.WebControls.DetailsView.ItemUpdated" />
<altmember cref="P:System.Web.UI.WebControls.DetailsView.DefaultMode" />
</Docs>
</Member>
<Member MemberName="Keys">
<MemberSignature Language="C#" Value="public System.Collections.Specialized.IOrderedDictionary Keys { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Specialized.IOrderedDictionary Keys" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.Keys" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Keys As IOrderedDictionary" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Collections::Specialized::IOrderedDictionary ^ Keys { System::Collections::Specialized::IOrderedDictionary ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Keys : System.Collections.Specialized.IOrderedDictionary" Usage="System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.Keys" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Specialized.IOrderedDictionary</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a dictionary that contains the key field name/value pairs for the updated record.</summary>
<value>An <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> that contains a dictionary of key field name/value pairs for the updated record.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.Keys%2A> property to access the values of the key field for an updated record. For example, you can use these values to keep a log of updated records.
The <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.Keys%2A> property returns an object that implements the <xref:System.Collections.Specialized.IOrderedDictionary> interface. The object contains <xref:System.Collections.DictionaryEntry> objects that represent the fields of the updated record.
> [!NOTE]
> As a shortcut, you can also use the indexer of the <xref:System.Collections.Specialized.IOrderedDictionary> object to access the field values directly.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.Keys%2A> property to access the values of the key field for an updated record.
[!code-aspx-csharp[DetailsViewUpdatedEventArgs#1](~/samples/snippets/csharp/VS_Snippets_WebNet/DetailsViewUpdatedEventArgs/CS/detailsviewupdatedeventargscs.aspx#1)]
[!code-aspx-vb[DetailsViewUpdatedEventArgs#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/DetailsViewUpdatedEventArgs/VB/detailsviewupdatedeventargsvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.DetailsView" />
<altmember cref="T:System.Web.UI.WebControls.DetailsViewUpdatedEventHandler" />
<altmember cref="T:System.Collections.Specialized.IOrderedDictionary" />
<altmember cref="T:System.Collections.DictionaryEntry" />
<altmember cref="E:System.Web.UI.WebControls.DetailsView.ItemUpdated" />
</Docs>
</Member>
<Member MemberName="NewValues">
<MemberSignature Language="C#" Value="public System.Collections.Specialized.IOrderedDictionary NewValues { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Specialized.IOrderedDictionary NewValues" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.NewValues" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property NewValues As IOrderedDictionary" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Collections::Specialized::IOrderedDictionary ^ NewValues { System::Collections::Specialized::IOrderedDictionary ^ get(); };" />
<MemberSignature Language="F#" Value="member this.NewValues : System.Collections.Specialized.IOrderedDictionary" Usage="System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.NewValues" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Specialized.IOrderedDictionary</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a dictionary that contains the new field name/value pairs for the updated record.</summary>
<value>An <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> that contains a dictionary of the new field name/value pairs for the updated record.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.NewValues%2A> property to access the new field values for the updated record. For example, you can use these values to keep a log of updated records.
The <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.NewValues%2A> property returns an object that implements the <xref:System.Collections.Specialized.IOrderedDictionary> interface. The object contains <xref:System.Collections.DictionaryEntry> objects that represent the fields of the updated record.
> [!NOTE]
> As a shortcut, you can also use the indexer of the <xref:System.Collections.Specialized.IOrderedDictionary> object to access the field values directly.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.NewValues%2A> property to access the new values entered by the user for the non-key fields of the updated record.
[!code-aspx-csharp[DetailsViewUpdatedEventArgs#1](~/samples/snippets/csharp/VS_Snippets_WebNet/DetailsViewUpdatedEventArgs/CS/detailsviewupdatedeventargscs.aspx#1)]
[!code-aspx-vb[DetailsViewUpdatedEventArgs#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/DetailsViewUpdatedEventArgs/VB/detailsviewupdatedeventargsvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.DetailsView" />
<altmember cref="T:System.Web.UI.WebControls.DetailsViewInsertedEventHandler" />
<altmember cref="T:System.Collections.Specialized.IOrderedDictionary" />
<altmember cref="T:System.Collections.DictionaryEntry" />
<altmember cref="E:System.Web.UI.WebControls.DetailsView.ItemUpdated" />
</Docs>
</Member>
<Member MemberName="OldValues">
<MemberSignature Language="C#" Value="public System.Collections.Specialized.IOrderedDictionary OldValues { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Specialized.IOrderedDictionary OldValues" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.OldValues" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property OldValues As IOrderedDictionary" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Collections::Specialized::IOrderedDictionary ^ OldValues { System::Collections::Specialized::IOrderedDictionary ^ get(); };" />
<MemberSignature Language="F#" Value="member this.OldValues : System.Collections.Specialized.IOrderedDictionary" Usage="System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.OldValues" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Specialized.IOrderedDictionary</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a dictionary that contains the original field name/value pairs for the updated record.</summary>
<value>An <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> that contains a dictionary of the original field name/value pairs for the updated record.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.OldValues%2A> property to access the original field values for the updated record. For example, you can use these values to keep a log of updated records.
The <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.OldValues%2A> property returns an object that implements the <xref:System.Collections.Specialized.IOrderedDictionary> interface. The object contains <xref:System.Collections.DictionaryEntry> objects that represent the fields of the updated record.
> [!NOTE]
> As a shortcut, you can also use the indexer of the <xref:System.Collections.Specialized.IOrderedDictionary> object to access the field values directly.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.WebControls.DetailsViewUpdatedEventArgs.OldValues%2A> property to access the original values of the non-key fields for the updated record.
[!code-aspx-csharp[DetailsViewUpdatedEventArgs#1](~/samples/snippets/csharp/VS_Snippets_WebNet/DetailsViewUpdatedEventArgs/CS/detailsviewupdatedeventargscs.aspx#1)]
[!code-aspx-vb[DetailsViewUpdatedEventArgs#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/DetailsViewUpdatedEventArgs/VB/detailsviewupdatedeventargsvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.WebControls.DetailsView" />
<altmember cref="T:System.Web.UI.WebControls.DetailsViewUpdatedEventHandler" />
<altmember cref="T:System.Collections.Specialized.IOrderedDictionary" />
<altmember cref="T:System.Collections.DictionaryEntry" />
<altmember cref="E:System.Web.UI.WebControls.DetailsView.ItemUpdated" />
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.