ListItemCollection.Insert 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在集合中指定的索引位置插入 a ListItem 。
多載
| 名稱 | Description |
|---|---|
| Insert(Int32, String) |
插入代表集合中指定字串、位於指定索引位置的 a ListItem 。 |
| Insert(Int32, ListItem) |
將指定的 ListItem 資料插入集合中指定的索引位置。 |
Insert(Int32, String)
插入代表集合中指定字串、位於指定索引位置的 a ListItem 。
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)
參數
備註
使用 Insert 該方法將 a ListItem 加入集合,索引由參數 index 指定。 此方法實作會產生 來 ListItem 表示參數指定的 item 文字。
Text新 ListItem 的性質值為 item,而性質Value的值null為 。 接著將此 ListItem 資料插入指定的索引中。
另請參閱
適用於
Insert(Int32, ListItem)
將指定的 ListItem 資料插入集合中指定的索引位置。
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)
參數
備註
使用 Insert 該方法將 a ListItem 加入集合,索引由參數 index 指定。 此方法實作將參數指定的 item 插入ListItem集合中指定的索引。