IObjectListFieldCollection.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:
 int IndexOf(System::String ^ fieldIDOrTitle);
public int IndexOf (string fieldIDOrTitle);
abstract member IndexOf : string -> int
Public Function IndexOf (fieldIDOrTitle As String) As Integer

Parameters

fieldIDOrTitle
String

A string to compare with the Title or DataField property.

Returns

The index of the specified field.

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

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:
 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
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.

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