<script language="VB" runat="server">
Sub Page_Load( s As Object, e As EventArgs )
If Not IsPostBack Then
Dim myHash As New HashTable()
myHash.Add( "ASP+", "1" )
myHash.Add( "COM+", "2" )
myHash.Add( "ADO+", "3" )
myHash.Add( "C#", "4" )
MyRepeater.DataSource = myHash
MyRepeater.DataBind
End If
End Sub
</script>
</head>
<body>
<h3>请看这是一个在 DataSet 上绑定一个 哈稀表 的操作代码</h2>
<form runat=server>
<asp:Repeater id="MyRepeater" runat="server">
<template name="itemtemplate">
<br>
<%# Container.DataItem.Key %> :
<%# Container.DataItem.Value %>
</template>
</asp:Repeater>
</form>
</body>
</html>
作者:豆腐()
……