Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
|
.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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 23rd, 2003, 07:02 AM
Registered User
 
Join Date: Sep 2003
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.

 
Old September 25th, 2003, 06:06 PM
Registered User
 
Join Date: Sep 2003
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







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 04: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 10:55 AM
DownLoad treeview ----WebControl HandSomeLi All Other Wrox Books 2 March 15th, 2004 10:10 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.