Rank: Newbie Groups: Member
 
 
Joined: 10/12/2007 Posts: 8 
	 | 
		   
	     
		    Hi,
  The context menu is getting the tree node value through node.getText()
  //JAVASCRIPT FUNCTION function ShowContextMenu(e, treeView, node) { { if (node.getLevel() == 2) { eo_ShowContextMenu(e, "ContextMenu1"); alert(node.getText()); var node_value=node.getText();
  } else if(node.getLevel()==3) eo_ShowContextMenu(e, "ContextMenu2"); } return true; }
  But I wish to pass this value in the query string "AddStudent.aspx" which is an item in the context menu1
 
  //CODING context menu 1 items
  <TopGroup Orientation="Vertical"> <Items> <eo:MenuItem Text-Html="Add a Student " NavigateUrl="AddStudent.aspx?node_value='"& ?????? &"'" TargetWindow="rbottom" RaisesServerEvent="True" > </eo:MenuItem>
  I know that the javascript variable cannot be passed to a Asp.control... Then how do I go about ?????? part. I just want the node.value to be passed to the AddStudent.aspx page
  Is there any vb.net code similar to the js code for eo_showcontextmenu?
  Any help is greatly appreciated
  Regards
 
 
 
  
		 
	 | 
	
		Rank: Administration Groups: Administration
 
 
Joined: 5/27/2007 Posts: 24,427 
	 | 
		   
	    
		    Hi, You won't be able to pass it that way. The easiest way for you is to store the target Url in a global variable, then instead of using NavigateUrl, use ClientSideOnItemClick:
 
    
        Code: JavaScript
         
        var g_arguments = null;
function ShowContextMenu(e, treeView, node)
{
    //Figure out the arguments based on node
    g_arguments = node.getValue();
} 
function on_context_menu_item_click(e, info)
{
    var url = "AddStudents.aspx?id=" + g_arguments;
    window.open(url, "_self");
} 
     
 
    
        Code: HTML/ASPX
         
        <eo:ContextMenu  ClientSideOnItemClick="on_context_menu_item_click" ...>
  .....
</eo:ContextMenu>  
     
 
		 
	 |