RSS
热门关键字:  下载  cms  模版  开源  dedecms
当前位置 :| 主页 > 站长学院 > Asp.Net教程 >

asp+中的hash表操作

来源:不详 作者:未知 时间:2006-07-28 Tag: 点击:
Hash 表是一组包含有Key 和 Value 数据 的表,我们可以通过 下面的这个例子 看看如何操作Hashtable
<html>
<head>

 

<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>


最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?
注册
热点关注
相关文章