数据<html>
<script language="C#" runat=server>
void Page_Load(Object sender, EventArgs e) {
// Create and populate a multi-dimensional array
int [][] MyArray = new int[5][];
for (int i=0; i<5; i++) {
MyArray[i] = new int[6];
for (int x=0; x<6; x++) {
MyArray[i][x] = x+(6*i);
}
}
// Databind array to server controls
Outer.DataSource = MyArray;
Outer.DataBind();
}
</script>
<body>
<asp:datalist id="Outer" runat=server>
<template name="ItemTemplate">
Here is an array's values:
<asp:repeater datasource="<%#Container.DataItem%>" runat=server>
<template name="ItemTemplate">
<%# Container.DataItem %>
</template>
</asp:repeater>
</template>
</asp:datalist>
</body>
</html>
多维数祖数据绑定!
80酷酷网 80kuku.com