<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Drawing" %>
 <script language="VB" runat="server">
'每个属性都被声明为public类型  
PUBLIC	vGridLines As GridLines
PUBLIC vBorderColor as String
PUBLIC  vCellPadding As Integer
Sub Page_Load(Source As Object, E As EventArgs) 
	Dim ds          As New DataSet
	Dim fs          As filestream
	dim xmLStream   As StreamReader
	fs = New filestream(Server.MapPath("nav.xml"), FileMode.Open, FileAccess.Read)
	xmlStream = new StreamReader(fs)
	ds.ReadXML(XmlStream)
	fs.Close()
	dlist.DataSource=ds.Tables("site").DefaultView
	dlist.DataBind()
	dlist.GridLines = vGridLines
	 dlist.BorderColor=System.Drawing.Color.FromName(vBorderColor)
	dlist.CellPadding=vCellPadding
End Sub
</script>
<asp:DataList runat=server id="dlist"
 RepeatDirection="horizontal" 
 RepeatMode="Table"
 Width="100%"
 BorderWidth="1"
 Font-Name="Verdana"
 Font-Size="8pt"
 HeaderStyle-BackColor="#aaaadd"
 SelectedItemStyle-BackColor="yellow"
 ItemStyle-BackColor="antiquewhite"
 AlternatingItemStyle-BackColor="tan"
  >
<ItemTemplate>
	<asp:HyperLink runat="server" 
	Text= '<%# Container.DataItem("sitename") %>'
	NavigateUrl= '<%# Container.DataItem("siteurl") %>' />
</ItemTemplate>
</asp:DataList>
