问题描述
- 后台给treenode的text赋值html标签,浏览器按字符串输出?
-
后台代码:
#region 初始化地区树结构
protected void BindingTree()
{
tv.Nodes.Clear();
DataTable tb = null;
SQLHelper.RunSqlforTable("select * from ERPFlowType", ref tb);
TreeNode newnode = new TreeNode();
newnode.Text = "表单类别分类" + "?" + "添加";
newnode.Value = "0";
newnode.Selected = true;
newnode.Expanded = true;
this.tv.Nodes.Add(newnode);
if (tb != null)
{
this.InitTree(this.tv.Nodes[0].ChildNodes, 0, tb);
}
}
浏览器直接把newnode.Text的值按字符串原样输出
时间: 2024-12-22 04:40:28