用datagrid可以简单的实现的呀,

解决方案 »

  1.   

    用datalist控件最好了...如下代码:在*.aspx中帮定数据:
    <asp:datalist id="DataList1" style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute; TOP: 88px" runat="server" BackColor="#ff6633" RepeatColumns="10" DataKeyField="id" Height="24px" Width="432px" OnItemCommand="SelectItem1">
    <ItemTemplate>
    <asp:LinkButton id="Ttitle" Text='<%# Container.DataItem("title") %>' CommandArgument='<%# Container.DataItem("topic") %>' BackColor=#ff6633 ForeColor=#ffffff Runat="Server"/>
    </ItemTemplate>
    <asp:LinkButton id="time" Text='<%# Container.DataItem("time") %>' CommandArgument='<%# Container.DataItem("topic") %>' BackColor=#ff6633 ForeColor=#ffffff Runat="Server"/>
    </ItemTemplate>在*.aspx.vb中连接数据库写入查询语句:Dim comd1 As SqlCommand
                SqlConnection1.Open()
                comd1 = New SqlCommand("select ID,title,time from htjc", SqlConnection1)
                DataList1.DataSource = comd1.ExecuteReader()
                DataList1.DataBind()
                SqlConnection1.Close()
    </asp:datalist>好了...ok了!给分啊!!!!!!!!!!