惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
博客园 - Franky
GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
博客园_首页
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
C
CERT Recently Published Vulnerability Notes
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
L
LangChain Blog
L
LINUX DO - 最新话题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
AI
AI
T
Troy Hunt's Blog
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
S
Secure Thoughts
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Security @ Cisco Blogs
Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
Attack and Defense Labs
Attack and Defense Labs

博客园 - DODONG

在现有PDF文件上添加水印 c#获取硬件信息 一个读写csv文件的C#类 . C#操作Excel文件(读取Excel,写入Excel) . 解决全球化时区问题 利用ReportViewer读取Reporting Service数据 [转]用反射来处理多字段提交 查询数据表中重复的记录 CVS文件导入SQL 抽象工厂(Abstract Factory)模式 简单工厂(Simple Factory)模式 工厂方法(Factory Method)模式 用.NET创建Windows服务 关于SharePoint中查询写法和注意的地方 关于&运算符和^ 初识WAP开发时.. C#操作XML XMLHttp客户端操作数据 asp.net网页智能导航SmartNavigation的替代实现方式
ComponentArt.Web.UI中AJAX TreeView
DODONG · 2007-04-25 · via 博客园 - DODONG

.aspx

 1<%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI" %>
 2
 3<ComponentArt:TreeView id="TreeView1" Height="350px" Width="100%" 
 4    DragAndDropEnabled="false" 
 5    NodeEditingEnabled="false"
 6    KeyboardEnabled="true"
 7    CssClass="TreeView" 
 8    NodeCssClass="TreeNode" 
 9    SelectedNodeCssClass="SelectedTreeNode" 
10    HoverNodeCssClass="HoverTreeNode"
11    NodeEditCssClass="NodeEdit"
12    LineImageWidth="19" 
13    LineImageHeight="20"
14    DefaultImageWidth="16" 
15    DefaultImageHeight="16"
16    ItemSpacing="0" 
17    ImagesBaseUrl="images/"
18    NodeLabelPadding="3"
19    ShowLines="true" 
20    LineImagesFolderUrl="images/lines/"
21    EnableViewState="true"
22    runat="server" LoadingFeedbackText="Loading " >
23  </ComponentArt:TreeView>

.cs

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
using ComponentArt.Web.UI;

public partial class ProjectTree : System.Web.UI.Page
{
    
protected void Page_Load(object sender, EventArgs e)
    
{

        
if (!Page.IsPostBack)
        
{
            TreeViewNode rootnode 
= new TreeViewNode();
            rootnode.Text 
= "项目";
            rootnode.Expanded 
= true;
            TreeView1.Nodes.Add(rootnode);

            
//ProjectDB pdb = new ProjectDB();
          
//  IList<Project.Model.Project> plist = pdb.ProjectList();
            
//foreach (Project.Model.Project p in plist)
           
// {
                TreeViewNode pnode = new TreeViewNode();
                pnode.Text 
= "test";
                pnode.ID 
= "1001";
                pnode.Value 
= "Project";
                pnode.ContentCallbackUrl 
= "Test.aspx?Pid=10000";
                rootnode.Nodes.Add(pnode);
           
// }
        }
      


    }

}

test.aspx

protected void Page_Load(object sender, EventArgs e)
    
{
        Response.ContentType 
= "text/xml";
        ComponentArt.Web.UI.TreeView TreeView1 
= new ComponentArt.Web.UI.TreeView();

       
// ProjectDB pdb = new ProjectDB();
        if (Request.QueryString["Pid"!= null && Request.QueryString["Pid"!= "")
        
{
           
           
            
for (int i = 1; i < 10; i++)
            
{
                ComponentArt.Web.UI.TreeViewNode newNode 
= new ComponentArt.Web.UI.TreeViewNode();

                newNode.Text 
= i.ToString();
                
//newNode.ImageUrl = dbRow["ImageUrl"].ToString();
                newNode.ID = i.ToString();

                newNode.ContentCallbackUrl 
= "test.aspx?Pid="+i.ToString();
                TreeView1.Nodes.Add(newNode);
            }

        }


        Response.Write(TreeView1.GetXml());


    }