次の方法で共有


RepeaterItem コンストラクタ

RepeaterItem クラスの新しいインスタンスを初期化します。

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

構文

'宣言
Public Sub New ( _
    itemIndex As Integer, _
    itemType As ListItemType _
)
'使用
Dim itemIndex As Integer
Dim itemType As ListItemType

Dim instance As New RepeaterItem(itemIndex, itemType)
public RepeaterItem (
    int itemIndex,
    ListItemType itemType
)
public:
RepeaterItem (
    int itemIndex, 
    ListItemType itemType
)
public RepeaterItem (
    int itemIndex, 
    ListItemType itemType
)
public function RepeaterItem (
    itemIndex : int, 
    itemType : ListItemType
)
適用できません。

パラメータ

  • itemIndex
    コントロールの Items コレクション内での Repeater コントロールの項目のインデックス。

解説

このコンストラクタを使用して、RepeaterItem クラスの新しいインスタンスを作成し、初期化します。

使用例

RepeaterItem クラスの新しいインスタンスを作成および初期化する方法を次の例に示します。

Sub Page_Load(sender As Object, e As EventArgs)
    Dim index As Integer = 0
    Dim myItem As New RepeaterItem(index, ListItemType.Item)
End Sub
void Page_Load(Object sender, EventArgs e) 
{
   int index = 0;
   RepeaterItem myItem = new RepeaterItem(index, ListItemType.Item);
}
   
void Page_Load(Object sender, EventArgs e)
{
    int index = 0;
    RepeaterItem myItem =  new RepeaterItem(index, ListItemType.Item);
} //Page_Load

プラットフォーム

Windows 98,Windows Server 2000 SP4,Windows CE,Windows Millennium Edition,Windows Mobile for Pocket PC,Windows Mobile for Smartphone,Windows Server 2003,Windows XP Media Center Edition,Windows XP Professional x64 Edition,Windows XP SP2,Windows XP Starter Edition

Microsoft .NET Framework 3.0 は Windows Vista,Microsoft Windows XP SP2,および Windows Server 2003 SP1 でサポートされています。

バージョン情報

.NET Framework

サポート対象 : 3.0,2.0,1.1,1.0

参照

関連項目

RepeaterItem クラス
RepeaterItem メンバ
System.Web.UI.WebControls 名前空間
Repeater
ListItemType