Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old September 23rd, 2003, 08:02 AM
Registered User
 
Join Date: Sep 2003
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default help in TreeView Webcontrol

Hi All,
Can any one let me know how to read the attributes of a node in Treview webcontrol using c# languge.
I am trying with the following lines of code, but not working.

void mySelectChangeFn(Object sender, TreeViewSelectEventArgs e)
{
  String SelectedNode = "", AttributeValue = "";

  SelectedNode += e.NewNode.ToString();
  TreeNode Node = new TreeNode();
  Node = TreeView.GetNodeFromIndex(SelectedNode);
  AttributeValue = Node.FindNodeAttribute("table").ToString();
  Response.Write(AttributeValue);
}

I don't know what I am missing here.

Thanks in advance.
Cheers,
Victor.

Reply With Quote
  #2 (permalink)  
Old September 25th, 2003, 07:06 PM
Registered User
 
Join Date: Sep 2003
Location: Metairie, LA, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

'This code snippet although in Vb.net may help
    Private Sub TreeView1_AfterSelect(ByVal sender As System.Object, ByVal e As TreeViewSelectEventArgs) Handles TreeView1.SelectedIndexChange
        ' Determine by checking the Node property of the TreeViewEventArgs.
        Dim strNodeAttrib, strNodeText As String
        Dim Node As New TreeNode

        strNodeAttrib = e.NewNode

        Node = TreeView1.GetNodeFromIndex(strNodeAttrib)
        strNodeText = Node.Text
        Label1.Text = "Node Attribute: " & strNodeAttrib & ", node Text: " & strNodeText
    End Sub


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem getting value out of a custom webcontrol SV ASP.NET 2.0 Basics 0 November 17th, 2007 03:55 PM
Reflection and WebControl jdang67 ASP.NET 2.0 Professional 1 October 20th, 2005 05:14 PM
problem with UI Webcontrol-treeview hawing General .NET 1 December 30th, 2004 11:19 AM
Treeview Webcontrol problem Victor ADO.NET 2 September 9th, 2004 11:55 AM
DownLoad treeview ----WebControl HandSomeLi All Other Wrox Books 2 March 15th, 2004 10:10 AM



All times are GMT -4. The time now is 01:34 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.