| |||||||||||
DetailsView.DataKey PropertySystem.Web.UI.WebControls Namespace DetailsView Class .NET Framework version 2.0 Returns a DataKey object that represents the primary key of the displayed record in a DetailsView control. Syntax
Property Value
The property is read only with no default value. RemarksWhen the DataKeyNames property is set, the DetailsView control automatically creates a DataKey object that contains the key/value pairs of the field or fields listed in the DataKeyNames property for the current record. Use the DataKey property to get this DataKey object. This property is commonly used to obtain the keys and their corresponding values for the fields specified in the DataKeyNames property.
ExampleThe following example demonstrates how to use the DataKey property to determine the value of the key field bound to the DetailsView control.
See AlsoDetailsView Members DataKeyNames |
| ||||||||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme