| |||||||||||
BaseDataList.DataKeyField PropertySystem.Web.UI.WebControls Namespace BaseDataList Class Sets or retrieves the key field in the data source specified by the DataSource property. Syntax
Property Value
The property is read/write with no default value. RemarksUse the DataKeyField property to specify the field in the DataSource that will be used as the key column that serves as the record identifier. The specified field, which must contain unique values ( no duplicate entries ), is used to populate the DataKeys collection. This allows you to store the key field with a data listing control without displaying it in the control. The key field is commonly used in a handler for an event, such as ItemCommand or DeleteCommand, as part of a select or update query string to retrieve and/or revise a specific record in the data source. The key field helps the select or update query string identify the appropriate record to display or modify. ExampleThe following examples demonstrate using the DataKeyField property to identify the record selected by the user from a data source.
See AlsoBaseDataList Members DataSource DataMember DataKeys |
| ||||||||||
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