1 Replies - 3493 Views - Last Post: 27 May 2009 - 09:50 AM Rate Topic: -----

#1 puneetbadola   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 23-May 09

WANT TO GET SELECTED NODE FROM TREELIST IN ASP.NET AND c#APPLICATION

Post icon  Posted 23 May 2009 - 06:56 PM

Hi

i am new in asp.net i was trying to get value of selected node from tree list i hav created the treelist but i dont know how to call C# function on click event of treelist and then call javascript function in C# code.
Please help as i am working first time in asp.net

puneet
Is This A Good Question/Topic? 0
  • +

Replies To: WANT TO GET SELECTED NODE FROM TREELIST IN ASP.NET AND c#APPLICATION

#2 woodjom   User is offline

  • D.I.C Addict
  • member icon

Reputation: 34
  • View blog
  • Posts: 566
  • Joined: 08-May 08

Re: WANT TO GET SELECTED NODE FROM TREELIST IN ASP.NET AND c#APPLICATION

Posted 27 May 2009 - 09:50 AM

If you have used the designer to make the treelist, make sure each node has a value that is unique. Once you do that then make a treelist click event, automatic if done thru the object designer and do a switch...case statement to iterate the event value to each node and have it do something for each node. The difference between vb and cs is that in cs you have to actually tell it to break after each case statement or it will keep going down the case structure and performing all the code it comes in contact with till it hits a break or end switch statement.

its not that hard, its very similar to the menu item structure for recognition of each node. Catch as i stated before is making sure that each node you want clickable has a unique value that can be tested against. I think cs has the same rules as vb, but cpp will be slightly diferent as in cpp you will need to do an if..then statement instead of a switch..case statement.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1