讓我們看看另外一個例子
<script runat=
server >
Sub Page_Load(src as Objecte as EventArgs)
Dim arrPizzaTopping as new ArrayList()
arrPizzaToppingAdd( Supreme )
arrPizzaToppingAdd( Italian Classic )
arrPizzaToppingAdd( Meat Lover )
lstPizzaToppingDataSource = arrPizzaTopping
lstPizzaToppingDataBind()
End Sub
</script>
<asp:listbox rows=id= lstPizzaTopping runat= server />
數據綁定是把腳本跟用戶界面分離開來的一個例子(比如HTML代碼)
關於數據庫的講了很多
<?xml version=
standalone= yes ?>
<lookup>
<!START OF: Topping > <topping>
<value>supreme</value>
<desc>Supreme</desc>
</topping><topping>
<value>italianclassic</value>
<desc>Italian Classic</desc>
</topping><topping>
<value>meatlover</value>
<desc>Meat Lover</desc>
</topping><!
END OF: Topping >
<!START OF: Crust > <crust>
<value>original</value>
<desc>Original Crust</desc>
</crust><crust>
<value>handstretched</value>
<desc>HandStretched Crust</desc>
</crust><crust>
<value>pan</value>
<desc>Pan Crust</desc>
</crust><!
END OF: Crust >
</lookup>
現在開始變魔術了
[
From:http://tw.wingwit.com/Article/program/net/201311/15078.html