ListItemCollection.Insert Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Inserts a ListItem in the collection at the specified index location.
Overloads
Insert(Int32, String) |
Inserts a ListItem which represents the specified string in the collection at the specified index location. |
Insert(Int32, ListItem) |
Inserts the specified ListItem in the collection at the specified index location. |
Insert(Int32, String)
Inserts a ListItem which represents the specified string in the collection at the specified index location.
public:
void Insert(int index, System::String ^ item);
public void Insert (int index, string item);
member this.Insert : int * string -> unit
Public Sub Insert (index As Integer, item As String)
Parameters
Remarks
Use the Insert method to add a ListItem to the collection at the index specified by the index
parameter. This implementation of the method creates a ListItem to represent the text specified by the item
parameter. The Text property of the new ListItem has the value item
, and the Value property has the value null
. This ListItem is then inserted in the collection at the specified index.
See also
Applies to
Insert(Int32, ListItem)
Inserts the specified ListItem in the collection at the specified index location.
public:
void Insert(int index, System::Web::UI::WebControls::ListItem ^ item);
public void Insert (int index, System.Web.UI.WebControls.ListItem item);
member this.Insert : int * System.Web.UI.WebControls.ListItem -> unit
Public Sub Insert (index As Integer, item As ListItem)
Parameters
Remarks
Use the Insert method to add a ListItem to the collection at the index specified by the index
parameter. This implementation of the method takes the ListItem specified by the item
parameter and inserts it in the collection at the specified index.
See also
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈