RepeaterItemCollection(ArrayList) Constructor
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.
Initializes a new instance of the RepeaterItemCollection class.
public:
RepeaterItemCollection(System::Collections::ArrayList ^ items);
public RepeaterItemCollection (System.Collections.ArrayList items);
new System.Web.UI.WebControls.RepeaterItemCollection : System.Collections.ArrayList -> System.Web.UI.WebControls.RepeaterItemCollection
Public Sub New (items As ArrayList)
Parameters
Examples
void Page_Load(Object Sender, EventArgs e)
{
if (!IsPostBack)
{
ArrayList myDataSource = new ArrayList();
myDataSource.Add(new PositionData("Item 1", "$6.00"));
myDataSource.Add(new PositionData("Item 2", "$7.48"));
myDataSource.Add(new PositionData("Item 3", "$9.96"));
// Initialize the RepeaterItemCollection using the ArrayList as the data source.
RepeaterItemCollection myCollection = new RepeaterItemCollection(myDataSource);
myRepeater.DataSource = myCollection;
myRepeater.DataBind();
}
}
Sub Page_Load(Sender As Object, e As EventArgs)
If Not IsPostBack Then
Dim myDataSource As New ArrayList()
myDataSource.Add(New PositionData("Item 1", "$6.00"))
myDataSource.Add(New PositionData("Item 2", "$7.48"))
myDataSource.Add(New PositionData("Item 3", "$9.96"))
' Initialize the RepeaterItemCollection using the ArrayList as the data source.
Dim myCollection As New RepeaterItemCollection(myDataSource)
myRepeater.DataSource = myCollection
myRepeater.DataBind()
End If
End Sub 'Page_Load
Remarks
Use this constructor to create and initialize a new instance of the RepeaterItemCollection class.
Applies to
See also
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET