' ASPX_Repeater_using_wucDataSet.aspx.vb.txt ' ' Mostly writen by Dan Garlen dan.g@kgsystems.com 2/22/04 ' Use at your own risk - but, have fun doing it. ' Portions of this code have been shamlessly copied from other unnamed sources - thank you to all. ' ' Requires: ASCX_Northwind_Dataset_and_Status_WebUserControl_wucDataSet.ascx.vb.txt ' ' Place a copy of "Northwind.mdb" in the project virtual directory ie C:\InetPub\wwwRoot\RepeaterExample ' ' Create this Client WebForm with a Repeater (leave default name of "Repeater1") ' Drag "wucDataSet.ascx" onto WebForm ' Leave name as default "WucDataSet1" ' ' ' Paste the following block of code in place of the empty Page_Load: Protected WithEvents wucDataSet1 As wucDataSet Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim dsNorthwindCustomers As DataSet = wucDataSet1.dsNorthwind If wucDataSet1.Status Then Repeater1.DataSource = dsNorthwindCustomers Repeater1.DataMember = "tblCustomers" Repeater1.DataBind() End If End Sub ==================================================================================================== Open the HTML View of the WebForm Locate the following: Paste AS HTML (under Edit menu) as shown between the two tags:
Name City Country
<%# Container.DataItem("ContactName") %> <%# Container.DataItem("City") %> <%# Container.DataItem("Country") %>
<%# Container.DataItem("ContactName") %> <%# Container.DataItem("City") %> <%# Container.DataItem("Country") %>