How to Use Treeview in webcontrol in Asp.net 1.1

Source: Internet
Author: User

Step 1
Modify web. config
<? XML version = "1.0" encoding = "UTF-8"?>
<Configuration>

<Configsections>
<Section name = "microsoftwebcontrols" type = "system. configuration. namevaluesectionhandler, system, version = 1.0.5000.0, culture = neutral, publickeytoken = b77a5c561934e089"/>
</Configsections>

<Microsoftwebcontrols>
<Add key = "commonfiles" value = "treepath"/>
</Microsoftwebcontrols>

<System. Web>
...................................
Step 2: Add the following statement to the page where you want to use this control
<% @ Import namespace = "Microsoft. Web. UI. webcontrols" %>
<% @ Register tagprefix = "iecontrols"
Namespace = "Microsoft. Web. UI. webcontrols"
Assembly = "Microsoft. Web. UI. webcontrols"
%>


runat = "server">




3
change the property of the control to null (go to the design page and right-click the control-> properties) systemimagespath
4,
Create a New treepath directory on the website
upload files in C:/program files/ie Web controls/build/runtime to the directory
5,

WriteCode
This. tvbasic. nodes. Clear ();
Treenode Tn = new treenode ();
Tn. Text = "nodes level1 ";
Tvbasic. nodes. Add (TN );
Treenode TN2 = new treenode ();
Tn2.text = "level2 ";
Tvbasic. nodes. Add (TN2 );

Treenode tn3 = new treenode ();
Tn3.text = "level3 ";
Tn. nodes. Add (tn3 );

Other visibility
Http://www.cnblogs.com/adandelion/archive/2005/09/13/235681.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.