Edit

Kongsi melalui


ObjectListFieldCollection.IndexOf Method

Definition

Returns the index of a field. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

Overloads

IndexOf(String)

Returns the index of a field. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

IndexOf(ObjectListField)

Returns the index of a field. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

IndexOf(String)

Returns the index of a field. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

public:
 virtual int IndexOf(System::String ^ fieldIDOrName);
public int IndexOf (string fieldIDOrName);
abstract member IndexOf : string -> int
override this.IndexOf : string -> int
Public Function IndexOf (fieldIDOrName As String) As Integer

Parameters

fieldIDOrName
String

A string to compare with the Title or DataField property.

Returns

The index of the specified field.

Implements

Remarks

In the second version of this method, it searches for a field with the Title property fieldId and returns the first matching field. If no match is found, it searches for a field with the DataField property's fieldID parameter and returns the first matching field. Otherwise, it returns -1.

See also

Applies to

IndexOf(ObjectListField)

Returns the index of a field. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

public:
 virtual int IndexOf(System::Web::UI::MobileControls::ObjectListField ^ field);
public int IndexOf (System.Web.UI.MobileControls.ObjectListField field);
abstract member IndexOf : System.Web.UI.MobileControls.ObjectListField -> int
override this.IndexOf : System.Web.UI.MobileControls.ObjectListField -> int
Public Function IndexOf (field As ObjectListField) As Integer

Parameters

field
ObjectListField

A field to search for in the specified collection.

Returns

The index of the specified field.

Implements

Remarks

In the first version of this method, it returns the index of the specified field. If the specified field is not in the collection, it returns -1.

See also

Applies to