datatable dt从数据库获取内容如下
key value
1 test / test
2 <span>test</span>ListBox ListBox1 = new ListBox;
ListBox1.DataSource = dt;
ListBox1.DataTextField = "key";
ListBox1.DataValueField = "value";
ListBox1.DataBind();结果显示的内容为
test / test
<span>test</span>
源代码为
test&nbsp;/&nbsp;test
<span>test</span>我需要的结果是
test / test
test
源代码为
test / test
<span>test</span>C#在时候做了HTML代码的转换,如何设置,使其不转换
key value
1 test / test
2 <span>test</span>ListBox ListBox1 = new ListBox;
ListBox1.DataSource = dt;
ListBox1.DataTextField = "key";
ListBox1.DataValueField = "value";
ListBox1.DataBind();结果显示的内容为
test / test
<span>test</span>
源代码为
test&nbsp;/&nbsp;test
<span>test</span>我需要的结果是
test / test
test
源代码为
test / test
<span>test</span>C#在时候做了HTML代码的转换,如何设置,使其不转换
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货