
编程问题:在ASP.NET中如何在页面中输出空格。
1个回答
展开全部
private void CreateTreeEx(string parentNo) { ExList<string[,]> nodeLists; nodeLists = this.GetNodeInfo(parentNo); if (nodeLists != null) { string[,] nodeInfo; string Value; string Text; if (Constant.IsChinese) { for (int i = 0; i < nodeLists.Count; i++) { nodeInfo = nodeLists[i]; Value = nodeInfo[0, 0].ToString(); Text = nodeInfo[0, 1].ToString(); this.Items.Add(new ListItem(GetText(Text, parentNo), Value)); CreateChildNode(nodeInfo[0, 3].ToString()); } } else { for (int i = 0; i < nodeLists.Count; i++) { nodeInfo = nodeLists[i]; Value = nodeInfo[0, 0].ToString(); Text = nodeInfo[0, 4].ToString(); this.Items.Add(new ListItem(GetText(Text, parentNo), Value)); CreateChildNode(nodeInfo[0, 3].ToString()); } } } } const string KGString = " "; private string GetText(string text, string parentNo) { int len = parentNo.Length; int ys = len / 5; string newText = string.Empty; for (int i = 0; i < ys; i++) { newText += KGString; } newText = newText + text; return newText; }
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询