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
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기