成都创新互联主营利津网站建设的网络公司,主营网站建设方案,成都App制作,利津h5重庆小程序开发公司搭建,利津网站营销推广欢迎利津等地区企业咨询
-----后台
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Text; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } public string GetzNodes() { StringBuilder sb = new StringBuilder(); sb.Append(""); return sb.ToString(); } ////// 设置节点 /// /// id /// 父级id /// 名称 /// 是否展开? ///返回节点 private string SetParametes(string id, string pid, string name,bool open=false) { StringBuilder sb = new StringBuilder(); sb.Append("{"); sb.AppendFormat("id:{0},",id); sb.AppendFormat("pId:{0},",pid); if (open) { sb.AppendFormat("name:\"{0}\",", name); sb.Append("open: true"); } else { sb.AppendFormat("name:\"{0}\"", name); } sb.Append("},"); return sb.ToString(); } }
-----前台
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><%=GetzNodes()%>
整合包下载:http://down.51cto.com/data/1967063