<marquee onmouseover="this.stop()" style="Z-INDEX: 101; LEFT: 0px; WIDTH: 234px; POSITION: absolute; TOP: 5px; HEIGHT: 132px" onmouseout="this.start()" scrollAmount="1" scrollDelay="100" direction="up" width="234" height="132"><asp:datalist id="dl1" runat="server" BackColor="InactiveCaptionText">
<SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#339966"></SelectedItemStyle>
<ItemStyle Font-Size="9.5pt" Font-Names="新宋体" ForeColor="#333333" BackColor="InactiveCaptionText"></ItemStyle>
<ItemTemplate>
<FONT face="宋体"></FONT><font color="blue">>></font> <A style="FONT-SIZE: 9.5pt; CURSOR: hand; COLOR: blue; TEXT-DECORATION: none" href='hr04.aspx?id=<%# DataBinder.Eval(container,"DataItem.id") %>'>
<%# DataBinder.Eval(Container, "DataItem.zw_name") %>
&nbsp;&nbsp;&nbsp;
<%# DataBinder.Eval(Container, "DataItem.zw_date","{0:d}") %>
</A>
</ItemTemplate>
<FooterStyle ForeColor="#333333" BackColor="InactiveCaptionText"></FooterStyle>
<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="InactiveCaptionText"></HeaderStyle>
</asp:datalist></marquee>
这是后码代码:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        '在此处放置初始化页的用户代码
        Dim sqlConn As New SqlClient.SqlConnection()
        Dim sqlSelectStr As String = "select top 5 id,zw_name,zw_date from human"
        sqlConn.ConnectionString = "Server=你的服务器;Database=数据库;uid=用户;pwd=密码"     
        sqlConn.Open() ''打开数据库连接
               '--------------------------------------------
        Dim sqlDA As New SqlClient.SqlDataAdapter(sqlSelectStr, sqlConn)
        ''-----------------------------------------------
        Dim produceDS As New DataSet()
        sqlDA.Fill(produceDS, "human")
        dl1.DataSource = produceDS.Tables("human").DefaultView
        dl1.DataBind()
        sqlConn.Close()
        '---------------------------------------------------
    End Sub