列表框未显示粗体显示来自Asp.net中数据库的数据 [英] List box is not displaying bold for the data from Database in Asp.net

查看:63
本文介绍了列表框未显示粗体显示来自Asp.net中数据库的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在将数据库中的数据绑定到列表框.
来自数据库的数据如下

Hi,

I am binding data from data base to listbox.
from database the data as follows

ID              value
---             -----
1               a
2               <b>b</b>
3               c


但是它显示为文本.我需要以粗体显示第二条记录.


But it is displaying as text. I need to display the second record in Bold.

Please reply if u know the answer.

推荐答案



DataList或Repeater控件非常适合自定义动态数据.您可以使用DataList或Repeater进行此操作.

请参考:
http://www.asp.net/data-access/tutorials/display-data-with-the-datalist-and-repeater-controls-vb [ http://www.w3schools.com/aspnet/aspnet_datalist.asp [
Hi,

The DataList or Repeater control is perfect to do customization of your dynamic data. You can do this using DataList or Repeater.

Please Refer:
http://www.asp.net/data-access/tutorials/displaying-data-with-the-datalist-and-repeater-controls-vb[^]
http://www.w3schools.com/aspnet/aspnet_datalist.asp[^]


ListBox不能使用其他HTML渲染不同的项目.如果需要列表框和此呈现功能的行为,我看不到简单的解决方案.

—SA
The ListBox cannot use different HTML rendering for different items. I don''t see a simple solution if you need the behavior of the list box and this rendering feature.

—SA


这篇关于列表框未显示粗体显示来自Asp.net中数据库的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆