ClientSideCommand NavigateURL

2 posts, 0 answers
  1. iomega 55
    iomega 55 avatar
    64 posts
    Member since:
    Dec 2004

    Posted 11 Aug 2009 Link to this post

    Is there any way to have something like this?

    menu item 1:

    menu item 2:

    I mean, if there is a way to call a javascript function directly from the navigateurl. I have a dynamic creation of the menu, so I need to have only in the clientside the commands( and the code) required for that particular user profile.

    Thanks in advance.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 12 Aug 2009 Link to this post


    The NavigateUrl property is for specifying the URL to link to when the item is clicked. One suggestion to execute the clientside code is attaching " OnClientItemClicked " event for radmenu and execute the code as shown below.

    protected void Page_Load(object sender, EventArgs e) 
        RadMenu menu = new RadMenu();         
        RadMenuItem item1 = new RadMenuItem("Item1"); 
        RadMenuItem item2 = new RadMenuItem("Item2"); 
        menu.OnClientItemClicked = "test"

    <script type="text/javascript"
    function test() 
        // Execute the client code 

Back to Top