热门IT资讯网

4,Checkbox 勾选操作

发表于:2024-11-29 作者:热门IT资讯网编辑
编辑最后更新 2024年11月29日,-----后台 using System;using System.Collections.Generic;using System.Linq;using System.Web;using Syste

-----后台

 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(", click:false");        sb.Append("},");        return sb.ToString();    }}

-----前台

 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>                                <%=GetzNodes()%>    


    整合包下载:http://down.51cto.com/data/1967063

    0