ControlCollection.AddAt メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ControlCollection.AddAt メソッドの意味・解説 

ControlCollection.AddAt メソッド

指定したインデックス位置に、指定した Control オブジェクト追加します

名前空間: System.Web.UI
アセンブリ: System.Web (system.web.dll 内)
構文構文

例外例外
例外種類条件

ArgumentNullException

child パラメータコントロール指定しません。

ArgumentOutOfRangeException

index パラメータが 0 未満か、ControlCollection.Count プロパティより大きい値です。

HttpException

ControlCollection は読み取り専用です。

解説解説
使用例使用例

AddAt メソッド使用してChildControl2 という名前の新しい LiteralControl を作成しインデックス位置 1 にある myButton コントロールControlCollection コレクション追加するコード例次に示します

' Create a LiteralControl and use the Add method to add it
' to a button's ControlCollection, then use the AddAt method
' to add another LiteralControl to the collection at the
' index location of 1.
Dim myLiteralControl As LiteralControl =  _
    new LiteralControl("ChildControl1")
myButton.Controls.Add(myLiteralControl)
myButton.Controls.AddAt(1,new LiteralControl("ChildControl2"))
Response.Write("<b>ChildControl2 is added at index 1</b>")

' Get the Index location of the myLiteralControl LiteralControl
' and write it to the page.
Response.Write("<br><b>Index of the ChildControl myLiteralControl
 is </b>" & _
                 myButton.Controls.IndexOf(myLiteralControl))
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ControlCollection クラス
ControlCollection メンバ
System.Web.UI 名前空間
Control.Controls プロパティ
Add



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

ControlCollection.AddAt メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ControlCollection.AddAt メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS