Solved

Fields to store SelctedNode C#

Posted on 2009-04-12
4
231 Views
Last Modified: 2012-05-06
Hi,
Currently I have SelctedNode.Name and SelctedNode.Tag to store 2 fields I want to use later on.
But now i have a 3rd text field I want to store it.
Is there another function in SelctedNode. I can use or I can use the SelctedNode.Name again in another way?
0
Comment
Question by:csharp_learner
  • 2
  • 2
4 Comments
 
LVL 29

Accepted Solution

by:
Gautham Janardhan earned 300 total points
ID: 24128233
u can use the .Tag property to store it as an array like

node.Tag = new object[]{valuetostore1,valuetostore2,valuetostore3};

Open in new window

0
 

Author Comment

by:csharp_learner
ID: 24128316
Thanks for the prompt reply.
So how can i access to the individual tag?
Cos when i tried to access to the individual array it prompts an error.
"treeview.SelectedNode.Tag[0].ToString();"
0
 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 24128350

((object[])treeview.SelectedNode.Tag)[0].ToString();

Open in new window

0
 

Author Closing Comment

by:csharp_learner
ID: 31569421
Thanks, exactly what I was looking for.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Device Location 4 29
Keyboard 2 33
Hey!!!! 1 22
Calculate number of nights between two dates 5 24
Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question