ObjectListField 类
定义
注意
The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.
表示 ObjectList ASP.NET 移动控件的字段。Represents a field of an ObjectList ASP.NET mobile control. 此类不能被继承。This class cannot be inherited. 若要了解如何开发 ASP.NET 移动应用,请参阅 Mobile Apps & Sites with ASP.NET (ASP.NET 移动应用和网站)。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.
public ref class ObjectListField sealed : System::Web::UI::IStateManager
[System.Web.UI.MobileControls.PersistName("Field")]
public sealed class ObjectListField : System.Web.UI.IStateManager
[System.Web.UI.MobileControls.PersistName("Field")]
[System.Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")]
public sealed class ObjectListField : System.Web.UI.IStateManager
[<System.Web.UI.MobileControls.PersistName("Field")>]
type ObjectListField = class
interface IStateManager
[<System.Web.UI.MobileControls.PersistName("Field")>]
[<System.Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")>]
type ObjectListField = class
interface IStateManager
Public NotInheritable Class ObjectListField
Implements IStateManager
- 继承
-
ObjectListField
- 属性
- 实现
示例
有关完整示例,请参阅 ObjectList 概述。For a complete example, see the ObjectList overview.
注解
字段的类型为 ObjectListField 。A field is of type ObjectListField. 如果要显示多个字段,可以为对象列表中的每个项指定多个字段。When you want to display multiple fields, you can specify multiple fields for each item in an object list. 若要在的声明内创建字段 ObjectList ,请将声明 ObjectListField 为 <Field> 元素。To create a field within the declaration of an ObjectList, you declare an ObjectListField as a <Field> element. 每个字段都与一个属性名称关联。Each field is associated with a property name. 当列表项绑定到数据对象时,每个字段都绑定到对象的相应属性。When a list item is bound to a data object, each field is bound to the corresponding property of the object.
ObjectList提供了三种定义字段的方法:The ObjectList provides three ways to define a field:
以声明方式使用
<Field>对象列表中的子元素Declaratively, by using<Field>child elements within the object list编程方式,通过构造 ObjectListField 对象并将其添加到控件的字段成员集合中Programmatically, by constructing ObjectListField objects and adding them to the Fields member collection of the control
通过将 AutoGenerateFields 属性设置为自动
true。Automatically, by setting the AutoGenerateFields property totrue.
构造函数
| ObjectListField() |
创建 ObjectListField 类的新实例。Creates a new instance of the ObjectListField class. 此 API 已废弃不用。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 Mobile Apps & Sites with ASP.NET (ASP.NET 移动应用和网站)。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. |
属性
| DataField |
获取或设置从其绑定数据的属性的名称。Gets or sets the name of the property from which to bind data. 必须设置该值以确保进行数据绑定。The value must be set to ensure data binding. 默认值为空字符串 ("")。The default value is an empty string (""). 此 API 已废弃不用。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 Mobile Apps & Sites with ASP.NET (ASP.NET 移动应用和网站)。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. |
| DataFormatString |
获取或设置在设置数据绑定值的格式时要使用的格式设置字符串。Gets or sets the formatting string to use when formatting a data-bound value. 默认值为空字符串("")。The default is an empty string (""). 此 API 已废弃不用。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 Mobile Apps & Sites with ASP.NET (ASP.NET 移动应用和网站)。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. |
| Name |
获取或设置指定对象的名称。Gets or sets the name of the specified object. 默认值为空字符串 ("")。The default value is an empty string (""). 此 API 已废弃不用。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 Mobile Apps & Sites with ASP.NET (ASP.NET 移动应用和网站)。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. |
| Title |
获取或设置指定字段的标题。Gets or sets the title of the specified field. 默认值为空的 |
| Visible |
获取或设置指示是否呈现指定控件的值。Gets or sets a value indicating whether the specified control is rendered. 默认值为 |
方法
| DataBindItem(Int32, ObjectListItem) |
将指定项的字段绑定到相应数据。Binds the field of the specified item to its corresponding data. 由 ASP.NET 在内部调用。Called internally by ASP.NET. 此 API 已废弃不用。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 Mobile Apps & Sites with ASP.NET (ASP.NET 移动应用和网站)。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. |
| Equals(Object) |
确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object. (继承自 Object) |
| GetHashCode() |
作为默认哈希函数。Serves as the default hash function. (继承自 Object) |
| GetType() |
获取当前实例的 Type。Gets the Type of the current instance. (继承自 Object) |
| MemberwiseClone() |
创建当前 Object 的浅表副本。Creates a shallow copy of the current Object. (继承自 Object) |
| ToString() |
返回表示当前对象的字符串。Returns a string that represents the current object. (继承自 Object) |
显式接口实现
| IStateManager.IsTrackingViewState |
有关此成员的说明,请参见 IsTrackingViewState。For a description of this member, see IsTrackingViewState. 此 API 已废弃不用。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 Mobile Apps & Sites with ASP.NET (ASP.NET 移动应用和网站)。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. |
| IStateManager.LoadViewState(Object) |
有关此成员的说明,请参见 LoadViewState(Object)。For a description of this member, see LoadViewState(Object). 此 API 已废弃不用。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 Mobile Apps & Sites with ASP.NET (ASP.NET 移动应用和网站)。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. |
| IStateManager.SaveViewState() |
有关此成员的说明,请参见 SaveViewState()。For a description of this member, see SaveViewState(). 此 API 已废弃不用。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 Mobile Apps & Sites with ASP.NET (ASP.NET 移动应用和网站)。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. |
| IStateManager.TrackViewState() |
有关此成员的说明,请参见 TrackViewState()。For a description of this member, see TrackViewState(). 此 API 已废弃不用。This API is obsolete. 若要了解如何开发 ASP.NET 移动应用,请参阅 Mobile Apps & Sites with ASP.NET (ASP.NET 移动应用和网站)。For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET. |