376 lines
22 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<Type Name="DataKey" FullName="System.Web.UI.WebControls.DataKey">
<TypeSignature Language="C#" Value="public class DataKey : System.Web.UI.IStateManager" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Web.UI.IStateManager</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="T:System.Web.UI.WebControls.DataKey" /> class is used to represent the primary key for a record in a data-bound control. The primary key for a record can be composed of one of more fields from the data source. Although the <see cref="T:System.Web.UI.WebControls.DataKey" /> class is not a collection, it can store multiple key field values. The key field values are populated when one of the constructors for the <see cref="T:System.Web.UI.WebControls.DataKey" /> class is called. You can retrieve a key field value from a <see cref="T:System.Web.UI.WebControls.DataKey" /> object in the following ways:</para>
<list type="bullet">
<item>
<para>Use the <see cref="P:System.Web.UI.WebControls.DataKey.Item(System.Int32)" /> property to retrieve a key field value at a specific index in the <see cref="T:System.Web.UI.WebControls.DataKey" /> object.</para>
</item>
<item>
<para>Use the <see cref="P:System.Web.UI.WebControls.DataKey.Item(System.String)" /> property to retrieve a key field value of a specific field.</para>
</item>
<item>
<para>Use the <see cref="P:System.Web.UI.WebControls.DataKey.Value" /> property to retrieve the value of the key field at index 0 in the <see cref="T:System.Web.UI.WebControls.DataKey" /> object. This property is often used as a shortcut to retrieve the key value of a record when the primary key contains only one field.</para>
</item>
<item>
<para>Use the <see cref="P:System.Web.UI.WebControls.DataKey.Values" /> property to create an <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> object that can be used to iterate through the key field values.</para>
</item>
</list>
<para>In general, <see cref="T:System.Web.UI.WebControls.DataKey" /> objects are automatically generated by data-bound controls when the control's DataKeyNames property is set. The <see cref="T:System.Web.UI.WebControls.DataKey" /> objects contain the values of the key field or fields specified in the DataKeyNames property. Data-bound controls that display a single record at a time (such as <see cref="T:System.Web.UI.WebControls.DetailsView" /> or <see cref="T:System.Web.UI.WebControls.FormView" />) generally store the <see cref="T:System.Web.UI.WebControls.DataKey" /> object for the current record displayed in the DataKey property of the control. Data-bound controls that display multiple records at a time (such as <see cref="T:System.Web.UI.WebControls.GridView" />) generally store the <see cref="T:System.Web.UI.WebControls.DataKey" /> objects for each record in the control in a <see cref="T:System.Web.UI.WebControls.DataKeyArray" /> collection. The <see cref="T:System.Web.UI.WebControls.DataKeyArray" /> collection is then stored in the DataKeys property of the control.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Represents the primary key field or fields of a record in a data-bound control.</para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DataKey (System.Collections.Specialized.IOrderedDictionary keyTable);" />
<MemberType>Constructor</MemberType>
<Parameters>
<Parameter Name="keyTable" Type="System.Collections.Specialized.IOrderedDictionary" />
</Parameters>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use this constructor to create a new instance of the <see cref="T:System.Web.UI.WebControls.DataKey" /> class using the specified dictionary of key field values. The field values contained in the <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> object passed in for the <paramref name="keyTable" /> parameter are used to populate the <see cref="T:System.Web.UI.WebControls.DataKey" /> object.</para>
<block subset="none" type="note">
<para>This version of the constructor does not allow you to specify a list of field names in advance for the <see cref="T:System.Web.UI.WebControls.DataKey" /> object. Because the field names are not specified in advance, both the field names and values are stored in view state. To specify a list of field names in advance, use the <see cref="M:System.Web.UI.WebControls.DataKey.#ctor(System.Collections.Specialized.IOrderedDictionary,System.String[])" /> constructor.</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.DataKey" /> class using the specified dictionary of key field values.</para>
</summary>
<param name="keyTable">
<attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> that contains the key field values.</param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DataKey (System.Collections.Specialized.IOrderedDictionary keyTable, string[] keyNames);" />
<MemberType>Constructor</MemberType>
<Parameters>
<Parameter Name="keyTable" Type="System.Collections.Specialized.IOrderedDictionary" />
<Parameter Name="keyNames" Type="System.String[]" />
</Parameters>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use this constructor to create a new instance of the <see cref="T:System.Web.UI.WebControls.DataKey" /> class using the specified dictionary of key field values and array of field names. The field values contained in the <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> object passed in for the <paramref name="keyTable" /> parameter are used to populate the <see cref="T:System.Web.UI.WebControls.DataKey" /> object. This constructor also allows you to specify a list of the key field names for the <see cref="T:System.Web.UI.WebControls.DataKey" /> object in advance through the <paramref name="keyNames" /> parameter. Because the field names are specified in advance, only the key field values are stored in view state when this constructor is used.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Web.UI.WebControls.DataKey" /> class using the specified dictionary of key field values and array of field names.</para>
</summary>
<param name="keyTable">
<attribution license="cc4" from="Microsoft" modified="false" />The key field values.</param>
<param name="keyNames">
<attribution license="cc4" from="Microsoft" modified="false" />An array of strings that contain the names of the key fields.</param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="IsTrackingViewState">
<MemberSignature Language="C#" Value="protected virtual bool IsTrackingViewState { 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>The <see cref="P:System.Web.UI.WebControls.DataKey.IsTrackingViewState" /> property is used to determine whether the <see cref="T:System.Web.UI.WebControls.DataKey" /> object is tracking its view-state changes.</para>
<block subset="none" type="note">
<para>This property is used primarily by control developers.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets a value indicating whether the <see cref="T:System.Web.UI.WebControls.DataKey" /> object is tracking its view-state changes.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Item">
<MemberSignature Language="C#" Value="public virtual object this[int index] { get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="index">To be added.</param>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
<since version=".NET 2.0" />
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Item">
<MemberSignature Language="C#" Value="public virtual object this[string name] { get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="name" Type="System.String" />
</Parameters>
<Docs>
<param name="name">To be added.</param>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
<since version=".NET 2.0" />
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="LoadViewState">
<MemberSignature Language="C#" Value="protected virtual void LoadViewState (object savedState);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="savedState" Type="System.Object" />
</Parameters>
<Docs>
<param name="savedState">To be added.</param>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This method is used primarily by the .NET Framework infrastructure and is not intended to be used directly from your code. However, control developers can override this method to specify how a custom server control restores its view state. For more information, see <format type="text/html"><a href="0218d965-5d30-445b-b6a6-8870e70e63ce">ASP.NET State Management Overview</a></format>.</para>
<para>The <see cref="M:System.Web.UI.WebControls.DataKey.LoadViewState(System.Object)" /> method is used to load the previously saved view state of the <see cref="T:System.Web.UI.WebControls.DataKey" /> object.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Loads the previously saved view state of the <see cref="T:System.Web.UI.WebControls.DataKey" /> object.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="SaveViewState">
<MemberSignature Language="C#" Value="protected virtual object SaveViewState ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Web.UI.WebControls.DataKey.SaveViewState" /> method is a helper method used by the <see cref="T:System.Web.UI.WebControls.DataKey" /> class to save the state of the object.</para>
<block subset="none" type="note">
<para>This method is used primarily by control developers.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Saves the current view state of the <see cref="T:System.Web.UI.WebControls.DataKey" /> object.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An <see cref="T:System.Object" /> that contains the saved state of the <see cref="T:System.Web.UI.WebControls.DataKey" /> object.</para>
</returns>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="System.Web.UI.IStateManager.IsTrackingViewState">
<MemberSignature Language="C#" Value="bool System.Web.UI.IStateManager.IsTrackingViewState { get; }" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="P:System.Web.UI.WebControls.DataKey.System#Web#UI#IStateManager#IsTrackingViewState" /> property is used to determine whether the <see cref="T:System.Web.UI.WebControls.DataKey" /> object is tracking its view-state changes.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets a value indicating whether the <see cref="T:System.Web.UI.WebControls.DataKey" /> object is tracking its view-state changes.</para>
</summary>
</Docs>
</Member>
<Member MemberName="System.Web.UI.IStateManager.LoadViewState">
<MemberSignature Language="C#" Value="void IStateManager.LoadViewState (object savedState);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="savedState" Type="System.Object" />
</Parameters>
<Docs>
<param name="savedState">To be added.</param>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Web.UI.WebControls.DataKey.System#Web#UI#IStateManager#LoadViewState(System.Object)" /> method is used to load the previously saved view state of the <see cref="T:System.Web.UI.WebControls.DataKey" /> object.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Loads the previously saved view state of the <see cref="T:System.Web.UI.WebControls.DataKey" /> object.</para>
</summary>
</Docs>
</Member>
<Member MemberName="System.Web.UI.IStateManager.SaveViewState">
<MemberSignature Language="C#" Value="object IStateManager.SaveViewState ();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Web.UI.WebControls.DataKey.System#Web#UI#IStateManager#SaveViewState" /> method is a helper method used by the <see cref="T:System.Web.UI.WebControls.DataKey" /> class to save the state of the object.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Saves the current view state of the <see cref="T:System.Web.UI.WebControls.DataKey" /> object.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An <see cref="T:System.Object" /> that contains the saved state of the <see cref="T:System.Web.UI.WebControls.DataKey" /> object.</para>
</returns>
</Docs>
</Member>
<Member MemberName="System.Web.UI.IStateManager.TrackViewState">
<MemberSignature Language="C#" Value="void IStateManager.TrackViewState ();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This method is overridden to mark the starting point at which to begin tracking and saving changes to the <see cref="T:System.Web.UI.WebControls.DataKey" /> object as part of the object's view state.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Marks the starting point at which to begin tracking and saving view-state changes to the <see cref="T:System.Web.UI.WebControls.DataKey" /> object.</para>
</summary>
</Docs>
</Member>
<Member MemberName="TrackViewState">
<MemberSignature Language="C#" Value="protected virtual void TrackViewState ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This method is overridden to mark the starting point at which to begin tracking and saving changes to the <see cref="T:System.Web.UI.WebControls.DataKey" /> object as part of the object's view state.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Marks the starting point at which to begin tracking and saving view-state changes to the <see cref="T:System.Web.UI.WebControls.DataKey" /> object.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Value">
<MemberSignature Language="C#" Value="public virtual object Value { get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Instead of using the <see cref="P:System.Web.UI.WebControls.DataKey.Item(System.Int32)" /> or the <see cref="P:System.Web.UI.WebControls.DataKey.Values" /> property to retrieve a key field value from a <see cref="T:System.Web.UI.WebControls.DataKey" /> object, you can use the <see cref="P:System.Web.UI.WebControls.DataKey.Value" /> property as a shortcut to determine the value of the key field at index 0 in the <see cref="T:System.Web.UI.WebControls.DataKey" /> object. This property is commonly used to determine the key field value of a record when the record has only one key field.</para>
<block subset="none" type="note">
<para>If the <see cref="T:System.Web.UI.WebControls.DataKey" /> object does not contain any key fields, null is returned.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the value of the key field at index 0 in the <see cref="T:System.Web.UI.WebControls.DataKey" /> object.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="Values">
<MemberSignature Language="C#" Value="public virtual 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.DataKey.Values" /> property to retrieve an <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> object that contains every key field in the <see cref="T:System.Web.UI.WebControls.DataKey" /> object. The <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> object is often used to iterate through the key fields of a record.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets an <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> object that contains every key field in the <see cref="T:System.Web.UI.WebControls.DataKey" /> object.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
</Members>
</Type>