/*
豆腐制作 都是精品
http://www.asp888.net 豆腐技术站
如转载 请保留版权信息
*/
Hash 表是一组包含有Key 和 Value 数据 的表,我们可以通过 下面的这个例子 看看如何操作Hashtable
1<html>
2<head>
3<script language="VB" runat="server">
4Sub Page_Load( s As Object, e As EventArgs )
5If Not IsPostBack Then
6Dim myHash As New HashTable()
7myHash.Add( "ASP+", "1" )
8myHash.Add( "COM+", "2" )
9myHash.Add( "ADO+", "3" )
10myHash.Add( "C#", "4" )
11MyRepeater.DataSource = myHash
12MyRepeater.DataBind
13End If
14End Sub
15</script>
16</head>
17<body>
18<h3>请看这是一个在 DataSet 上绑定一个 哈稀表 的操作代码
19<form runat="server">
20<asp:repeater id="MyRepeater" runat="server">
21<template name="itemtemplate">
22<br/>
Container.DataItem.Key
1
2
Container.DataItem.Value
1</template>
2</asp:repeater>
3</form>
4</h3></body>
5</html>
作者:豆腐()