Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. TreeView help [modified]

TreeView help [modified]

Scheduled Pinned Locked Moved ASP.NET
csharpquestionjavaasp-nettools
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kingletas
    wrote on last edited by
    #1

    Hey all, I am fairly new to the asp.net world and so far i am missing C# fully capabilities and control. But since i want to learn how to create OS Independent solutions i want to try it out. Could anyone help me with this: 1-) How can i display a message box? In java script i know i can use alert, prompt and confirm. But i am using C# scripts... and some asp books i have doesn't have it. 2-) I have a treeView control on the website but i want to collapse all elements but the selected node, i am doing like this: protected void TreeVIEW_SelectedNodeChanged(object sender, EventArgs e) { TreeView Current = (TreeView)sender; TreeNodeCollection childs = Current.SelectedNode.ChildNodes; Current.SelectedNode.CollapseAll(); foreach (TreeNode child in childs) if (child.Parent == Current.SelectedNode) child.Parent.Expand(); else child.Parent.Collapse(); } what am i doing wrong??? thx all

    Luis E Tineo S

    modified on Thursday, February 07, 2008 1:59:38 PM

    C 1 Reply Last reply
    0
    • K kingletas

      Hey all, I am fairly new to the asp.net world and so far i am missing C# fully capabilities and control. But since i want to learn how to create OS Independent solutions i want to try it out. Could anyone help me with this: 1-) How can i display a message box? In java script i know i can use alert, prompt and confirm. But i am using C# scripts... and some asp books i have doesn't have it. 2-) I have a treeView control on the website but i want to collapse all elements but the selected node, i am doing like this: protected void TreeVIEW_SelectedNodeChanged(object sender, EventArgs e) { TreeView Current = (TreeView)sender; TreeNodeCollection childs = Current.SelectedNode.ChildNodes; Current.SelectedNode.CollapseAll(); foreach (TreeNode child in childs) if (child.Parent == Current.SelectedNode) child.Parent.Expand(); else child.Parent.Collapse(); } what am i doing wrong??? thx all

      Luis E Tineo S

      modified on Thursday, February 07, 2008 1:59:38 PM

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      kingletas wrote:

      But i am using C# scripts

      Well, that just doesn't work. Javascript, not C#, is what runs on the client. So to show the client a message box, you need to use javascript.

      Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups