I've got a really easy problem, please help me:
There are two pages in one I'm creating a TreeView like that:
TreeView dbTree = new TreeView();
TreeNode dbTreeRoot = new TreeNode("Root" );
dbTree.Nodes.Ad d(dbTreeRoot);
..
..
- so my complete TreeView is populated in that code.
Now I wish to pass this whole TreeView to another site, where I've got
my TreeView Control:
<asp:TreeView ID="TreeView2" runat="server">
</asp:TreeView>
So how to pass this tree to put it into that control??
I thing that it should be a function in the second page:
public void FetchTree(TreeV iew source_tree)
{
// - the code, I've tried TreeView2 = source_tree, but it's not a solution
}
Or the only way is to save a TreeView to XML in a first, and then to
retrive it from XML in a second page to the control directly.
Thank you in advance! 3 3818
Hi christof
you will have to save treeview controls data somewhere and pass this data to
other page
you could use Session, Application state to use this
I suggest you to pass encoded XML to second page and then read it and build
second tree
Hope this help
--
Galin Iliev [MCSD, MCSD.NET]
Senior Software Developer www.wordassist.com
"christof" <no****@nomail. de> wrote in message
news:u9******** *****@TK2MSFTNG P11.phx.gbl... I've got a really easy problem, please help me:
There are two pages in one I'm creating a TreeView like that:
TreeView dbTree = new TreeView();
TreeNode dbTreeRoot = new TreeNode("Root" ); dbTree.Nodes.Ad d(dbTreeRoot); .. ..
- so my complete TreeView is populated in that code. Now I wish to pass this whole TreeView to another site, where I've got my TreeView Control:
<asp:TreeView ID="TreeView2" runat="server"> </asp:TreeView>
So how to pass this tree to put it into that control??
I thing that it should be a function in the second page:
public void FetchTree(TreeV iew source_tree) { // - the code, I've tried TreeView2 = source_tree, but it's not a solution }
Or the only way is to save a TreeView to XML in a first, and then to retrive it from XML in a second page to the control directly.
Thank you in advance!
Galin iliev wrote: Hi christof you will have to save treeview controls data somewhere and pass this data to other page you could use Session, Application state to use this
I suggest you to pass encoded XML to second page and then read it and build second tree
Hope this help
But you mean to do xml from scratch?
XmlDocument ...
...
or is there a ready method TreeView -> XML?
Thanks
There is no method until .net 2.0
christof wrote: Galin iliev wrote:
Hi christof you will have to save treeview controls data somewhere and pass this data to other page you could use Session, Application state to use this
I suggest you to pass encoded XML to second page and then read it and build second tree
Hope this help
But you mean to do xml from scratch?
XmlDocument ... ...
or is there a ready method TreeView -> XML?
Thanks This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: sai bo shan via DotNetMonster.com |
last post by:
hi,
i got a problem with CSharp TreeView control.
how can i Find/Search a Node in TreeView.
please help me!
SBS
--
|
by: Jan Krouwer |
last post by:
I have a treeview which is populated from a relational database. In order to
copy part of the tree, I need to add to the database the relationship of the
part of the tree to be copied but with new ids. I have built a collection of
the right number of ids. I am using the following code to recursively go
through the tree (some code left out). Pos is the position in the collection
of ids - I need to select the correct ids (need to use previous...
|
by: johnb41 |
last post by:
In my treeview, I need each node to hold a "value", not just
text/label. Kind of like how a ListBox item has text, and a value
associated with it. I need this because when a node is clicked, i need
to get the "value" behind the node and then use it do do something.
Anyway, I made a custom treenode class that inherits from Treenode, and
added a property called "value".
I was able to successfully create the Treeview programmatically...
|
by: christof |
last post by:
It'll be really easy...Sorry for that question:
I've got a MasterPage <%@ Master Language="C#" ClassName="MasterP" %>
and some slave.aspx.<%@ Page Language="C#"
MasterPageFile="~/Master1.master" AutoEventWireup="true"
CodeFile="ShowDatabases.aspx.cs" Inherits="ShowDatabases"
Title="Untitled Page" %><%@ MasterType VirtualPath="Master1.master" %>
In the slave page I'm creting and populating a TreeView which I would
like to pass to my...
|
by: R.A.M. |
last post by:
Hi,
I need your help in a problem of simple TreeView definition.
I have in .aspx:
<asp:TreeView ID="Directories" runat="server" />
which is filled in (in behind-code) with directories and files of my
ASP.NET application.
The problem is that nodes are displayed as hyperlinks
("javascript:...") but I would like to have only text labels (without
a link). Could you tell me please how to change the definition?
Thank you.
| |
by: tanya foster |
last post by:
Hello,
I have populated a treeview in asp.net 2.0 from an xmldocument. The
treeview structure in the asp web page looks something like...
-orderdata
-order
-lines
-operations
-materials
-material
|
by: Rick |
last post by:
Hi guys!
I have a problem with a master page that has a treeview control as menu, i
have a root node, 5 parents and each parent has 10 leafs, 50 pages in
total, each page is linked to master page, when i select a node in treeview
it redirects to N page, its ok, but i want each time i select a page in the
treeview it expand the tree to current node selected, i can't do it, each
time i select a node, treeview appears as originally i...
|
by: David |
last post by:
Hi all,
I am opening a webform with showModalDialog. This appears to pop-up fine,
though I have a problem...
Inside the webform is a treeview control.
When the treeview is populated, I am setting the treenode navigateurl to
javascript:Click('test')
|
by: =?Utf-8?B?TWlrZSBDb2xsaW5z?= |
last post by:
I have a treeview, which is in an accordion, which is in an updatepanel. When
I click on a node in the treeview, it loads up a control as it should. When I
click on the same node again, the previously loaded control disappears and
does not get reloaded. I am not sure how this is happening. Can someone tell
me why this is happening and show me how to stop the control from being
unloaded.
HTML and event for the treeview:
<asp:UpdatePanel...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |