
附上主要程序段的源代码:
Sub DataList_ItemCommand(sender as Object,e as DataListCommandEventArgs)
If emandSourcemandName="Detail" Then
DataList1.SelectedIndex=e.Item.ItemIndex
ElseIf emandSourcemandName="Close" Then
DataList1.SelectedIndex=-1
End If
DataList1.DataBind()
End sub
< form runat="server" >
< asp:DataList id="DataList1"
runat="server"
RepeatColumns="1"
RepeatDirecti
RepeatLayout="Flow"
DataSource="< %# DataSet1.DefaultView % >"
>
< HeaderTemplate >
Locati CommandName="Detail" ForeColor="#000000" ID="Detail" runat="server" Text="Detail" >< /asp:linkbutt >
< %# DataSet1.FieldValue("LOCATI CommandName="Detail" ForeColor="#000000" ID="Detail" runat="server" Text="Detail" >< /asp:linkbutt CommandName="Close" ForeColor="#000000" ID="Close" runat="server" Text="Close" >< /asp:LinkButton >
< /SelectedItemTemplate >
< /asp:DataList >
< /form >
无忧站长学院,建站自然无忧www.5ucms.org