TreeView Control
Posted Date Unknown stephin Francis Antony 2 Comments

I have a tree view in master page.How it is used to navigate other pages through sub menus with passing values

See All Responses Below...
Author
Message Rating
Posted on: 30/04/2013
TreeView should have properties to set to a specific URL.

See some code snippet below..

TreeNode tempNode = new TreeNode(StructMenu.strMenuName, StructMenu.iMenuID.ToString(), "", strMenuLink, "");
                        if (StructMenu.strMenuLink == "")
                        {
                            tempNode.SelectAction = TreeNodeSelectAction.None;
                        }
                        inTreeNode.ChildNodes.Add(tempNode);
                        tNode = inTreeNode.ChildNodes[i];
                        i++;
                        AddNode(iMenuIDLocal, tNode);//Recursive calling.
 
Posted on: 30/04/2013
void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
{
  if("aa" == e.Node.Text)
    Response.redirect(~/OtherPage.aspx?nodeid=100);
  else if("bb" == e.Node.Text)
   Response.redirect(~/OtherPage.aspx?nodeid=101);
 //and soon...
}
Share this page across other social networking sites



Please Login to Post Your Comments
Name (Max. 100 characters)
Please post your comments here
Select Language
Comments
Attach File(Max. Size: 2 MB)
A few simple rules when posting your Comments,
  1. Please post only answers relevant to the topic of discussion.
  2. Please dont misuse this site or do not be abusive, offensive, inappropriate,harass anyone on the boards or post ads or spam. Doing so will delete your inappropriate messages and will block or delete your account on this site. 

TekTipsDownload
GateExam
Academic Projects
TekTipsExperts



 
Site optimized for IE7, 1280 X 768 and above. Copyright © 2010 - 2018 KTS InfoTech
Site Developed Using KTS WebCloud