Edit

Share via


HttpFileCollectionWrapper.Item[] Property

Definition

Gets a posted file object from the file collection by either name or index.

Overloads

Item[Int32]

Gets the posted file object at the specified index.

Item[String]

Gets the posted file object that has the specified name from the collection.

Item[Int32]

Gets the posted file object at the specified index.

C#
public override System.Web.HttpPostedFileBase this[int index] { get; }

Parameters

index
Int32

The index of the item to get.

Property Value

The posted file object specified by index.

Exceptions

index is outside the valid range of indexes for the collection.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Item[String]

Gets the posted file object that has the specified name from the collection.

C#
public override System.Web.HttpPostedFileBase this[string name] { get; }

Parameters

name
String

The name of the object to get.

Property Value

The posted file object specified by name, if found; otherwise, null.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1