我正在从项目符号列表中读取数据库中的数据,如下所示
<asp:BulletedList ID="BulletedList1" runat="server"
DataSourceID="SqlDataSource1" DataTextField="description"
DataValueField="id">
</asp:BulletedList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:chaaapaConnectionString4 %>"
SelectCommand="SELECT * FROM [quiz]"></asp:SqlDataSource>
我希望它显示为链接。我怎么能这样做?
答案 0 :(得分:2)
您可以尝试使用DisplayMode =“HyperLink”
<asp:BulletedList
ID="BulletedList1"
runat="server"
DisplayMode="HyperLink"
DataSourceID="SqlDataSource1"
DataTextField="description"
DataValueField="id">
</asp:BulletedList>