Use the program to TreeView how to use the function of the ASPX implementation icon IE favorites

xiaoxiao2021-03-06  44

Main topic: How do you function like an IE collection in ASPX implementation? 300 points of heroes, how do I do such functions as the ASPX implementation icon IE favorites? Both menus are placed in this clip, and the placement can be controlled with the button, thank you!

Reply to: houbinbin () () Reputation: 95 2002-10-24 17: 08: 14Z score: 0? Window.external.addfavorite (location.href, document.title);

TOP

Reply to: yirenboy (one person) () Reputation: 99 2002-10-24 17: 15: 14Z score: 0? Our management platform is also a personalized design!

(We assume that a table that has been built to store the favorites data)

First, in each page you have to do, you should return the address and parameters of this page (if your page is dynamic), you can put a collection button on each page, click this button. Jump to a process page and make the information about the user verify.

Next, when the user is determined, the user and the returned address and parameter are stored in the collector's database, so that all information about the user is collected.

Finally, it is displaying a problem. If you want to use (the look of the resource browser), TreeView can be used, which is a fairly good solution.

The question must be noted:

1. Return to each page parameter.

2. How to collect a collection address for each user.

3. How to display, that is, custom different favorites for each user.

Note: If you have any questions, discuss together!

TOP

Reply to: yirenboy (one person) () reputation: 99 2002-10-24 17: 17: 12z score: 0? Effects such as 9CBS effect, everyone has different collection addresses

However, the display method is different, and I am tree!

TOP

Reply to: tuery () () Reputation: 88 2002-10-24 18: 52: 20Z score: 0? Sorry, houbinbin (), I think you misunderstand me, I don't want to add what to pay, I I want to know how to make a favorite in the ASPX web page, but that function is used to collect menu.

Yirenboy (one person), I feel that 9CBS has not yet the following

http://bbs1.tom.com/bbs.php?forumid=150

This page may use the bordered function, can we think about this? Thank you!

TOP

Reply to: yirenboy (one person) () reputation: 99 2002-10-24 19: 26: 05Z score: 0? Oh, misunderstand me!

Yes, I am talking about 9CBS, what everyone has different collectors, not to know his expression. If you have a form of expression, I also think that 9CBS is not available, but 9cbs In order to The user's collection (100) and the style of the site considers the current format.

I understand that the form you have to do is divided into two frames of two frames. If you have the address you give, you have also seen 9CBS in the form of the forum. In fact, 9CBS and the address you give are adopted Dividers and TreeView (the same as I am doing now), and TreeView is dynamically generated, that is, the user adds an address to the left appears on the left.

These questions are as mentioned above!

TOP

Reply to: yirenboy (one person) () Reputation: 99 2002-10-24 19: 27: 23Z score: 0? Tree map is used to display data according to the tree structure, which is relatively wide, such as in the computer. File system (resource manager in Windows), corporate or company's composition structure, etc. We know that Tool TreeView with VB, PB, Delphi and other tools under Windows, which can easily develop tree charts using the TreeView control. However, it is not so easy to implement a tree chart on the web page. Now use Microsoft's Internet Explorer WebControls provided in ASP.NET. It makes the tree map on the web and is as convenient to Windows, and even the same function is powerful. More flexible. This article describes how to develop tree graphs with Internet Explorer WebControls, explain how to connect Internet Explorer WebControls in ASP.NET to connect to the database to achieve any multi-layer display, easy to increase, modify, delete, move operating.

Internet Explorer WebControls is not in the standard Server Control of VS.NET, downloaded on Microsoft's site, download address is:

Http://msdn.microsoft.com/downloads/samples/internet/default.asp?url=/downloads/samples/internet/ASP_DOT_NET_SERVERCONTROLS/WebControls/default.asp

When you use the first time after downloading, right-click the toolbox Customize Toolbox ... → .NET Framework Components to find microsoft.web.ui.webControls.treeView, this TreeView control appears in the toolbox.

Dynamic loading Directory books have different methods, I will introduce two common methods in conjunction with examples.

1. Initialization is performed using a tree graph information table.

This method initializes all the nodes of the directory book when the page is initialized. Suitable for a large number of directory tree, and relatively fixed.

Tree establishment

The specific method is: Create a database, design the tree graph information table Tree_info, contain NodeID, ParentID, NodeName, Adderss, Icon field, and other fields depending on the actual business, the Node NodeName will display on the node of the tree control, NodeID field Save the unique identification number of the node, ParentID indicates the parent node number of the current node, and the identification number consists of a "linked list" to record the structure of the node on the tree. Design a web form to place the TreeView control.

The form structure of the example is as follows:

Primary key field name type length can be space

1 nodeid INT 4 0

0 ParentID INT 4 0

0 nodename nvarchar 100 0

0 Adderss Nvarchar 100 1

0 IMG NVARCHAR 100 1

0 IMGEX NVARCHAR 100 1

The example program is as follows:

Public class Webform1: System.Web.ui.page

{

Protected Microsoft.Web.ui.WebControls.toolbar Toolbar1;

Protected Microsoft.Web.ui.WebControls.treeView TreeView1;

protected system.web.ui.webcontrols.label A;

Protected connect_strings sqlcn;

String CNSTRING;

protected system.web.ui.webcontrols.textbox textbox1;

DataSet objDataSet = new dataset ();

Private Void Page_Load (Object Sender, System.EventArgs E)

{

Class1 TestClass = New class1 ();

TestClass.TestString = "fjdkls; a";

CNSTRING = Sqlcn.sqlConnectionstring;

IF (! this.ispostback)

{

CreateDataSet ();

Intitree (TreeView1.nodes, 0);

}

}

Private Void InTITREE (Treenodecollection NDS, INT PARENTID)

{

DataView DV = New DataView ();

// DATAROWVIEW DRV;

Treenode Tmpnd;

Int strid;

DV.TABLE = ObjDataSet.Tables ["Tree_Info"];

DV.ROWFILTER = "ParentID = '" ParentID "'";

Foreach (DataRowView Objrow In DV)

{

TMPND = New Treenode ();

Strid = (int) Objrow ["nodeid"];

TMPND.ID = Strid.toString ();

TMPND.TEXT = Objrow ["nodename"]. TOSTRING ();

TMPND.EXPANDIMAGEURL = Objrow ["IMGEX"]. TOSTRING ();

Tmpnd.imageURL = Objrow ["IMG"]. TOSTRING ();

Tmpnd.navigateURL = Objrow ["adderss"]. TOSTRING ();

TMPND.TARGET = "Name of the right frame";

Nds.add (tmpnd);

Intitree (nds [nds.count-1] .nodes, strid);

}

}

Private void createDataSet ()

{

SqlConnection Objcn = New SqlConnection (CNSTRING);

Objcn.open ();

String strsql = "SELECT * from Tree_info";

Sqldataadapter objadapter = new SqldataAdapter (strsql, objcn);

Objadapter.fill (ObjdataSet, "Tree_Info");

}

}

Among them, tmpnd.target = "Name of the right frame";

Is setting the framework that TREENODE affects

This way, click on the directory tree, you can redirect the right frame

TOP

Reply to: tuery () () reputation: 88 2002-10-25 01: 15: 14Z score: 0? Both blame me, Yirenboy (one person), you misunderstood, actually doing TreeView is very simple, we just want to go www.gotdotnet. COM RAREVIEW, it not only gives you the code to an example, soon it is good.

I would like to ask, for example, how to implement the button function that can remove the left borders in http://bbs1.tom.com/bbs.php?forumid=150.

Otherwise, how do you make the right on the right side when you choose the button under the left box TreeView? Thank you!

TOP

Reply to: yirenboy (one person) () reputation: 99 2002-10-25 08: 48: 35Z score: 0? This problem is also solved, you can set it to two frames (left and right), if it is Page1, Page2, where Page1 Put the TreeView's page, you can point the target to the right frame. Such as: node0.target = "Rightone"; Rightone is the right frame I defined in the second point, that is, the selected web page on the right.

Simply, the nodes of the TreeView on the left are connected to each connection address. When you click, you refreshed it to target Target (right frame), that is, the following example:

-------------------------------------------------- -----------------

For your question:

1. First create a blank page wfmabout.aspx point to the WFMaboutDisplay.asp page

-------------------------------------------------- ------------