Link to an external URL with querystring parameters from a MenuItem

2 posts, 0 answers
  1. Ehtesham
    Ehtesham avatar
    8 posts
    Member since:
    Apr 2013

    Posted 01 Aug 2013 Link to this post

    I am unable to link to an external URL from the Kendo Menu Item. I want the menu item to link to an external site with some querystring params.

    I have tried the menuItem.Url( ) and menuItem.Action(routeValues) to set the external URL i.e https://myOtherSite:99/path/To/Res and routeValue dictionary specifying the key values for the QueryString params, but the menuItem ignores the URL and passes the QueryString params to the current domain's root.

    Also I tried setting the .Url("https://myOtherSite:99/path/To/Res?a=1&b=2"). This results in no link on the menu at all.

    Is there a way to do this? 


    PS: My only solution for now is to link the menuItem to a Controller/Action in my application with an extra parameter (the URL) and add the redirect in there. But i want to avoid that.
  2. Dimiter Madjarov
    Dimiter Madjarov avatar
    2312 posts

    Posted 05 Aug 2013 Link to this post

    Hello Ehtesham,

    I tested the following code snippet, that you are referring to.

    And it creates the link as expected.
    <li class="k-item k-state-default k-first" role="menuitem">
        <a class="k-link" href="https://myOtherSite:99/path/To/Res?a=1&b=2">External</a>

    Could you please assure that the behavior is different on your side? If that is the case, please send me a sample project, where the issue is reproducing so I could inspect it locally and assist you further.

    I wish you a great day!

    Dimiter Madjarov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top