ListItemCollection.AddRange Method

Adds the items in an array of ListItem objects to the collection.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

public:
void AddRange (
	array<ListItem^>^ items
)
public void AddRange (
	ListItem[] items
)
public function AddRange (
	items : ListItem[]
)
Not applicable.

Parameters

items

An array of ListItem objects that contain the items to add to the collection.

Exception typeCondition

ArgumentNullException

items is a null reference (Nothing in Visual Basic).

Use the AddRange method to add the items in the array of ListItem objects specified by the items parameter. This allows you to add multiple ListItem objects to the collection in a single step.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: