This is a migrated thread and some comments may be shown as answers.

Link to an external URL with querystring parameters from a MenuItem

1 Answer 269 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Ehtesham
Top achievements
Rank 1
Ehtesham asked on 01 Aug 2013, 06:59 AM
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? 

Thanks.


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.

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 05 Aug 2013, 08:21 AM
Hello Ehtesham,


I tested the following code snippet, that you are referring to.
E.g.
children.Add().Text("External").Url("https://myOtherSite:99/path/To/Res?a=1&b=2");

And it creates the link as expected.
E.g.
<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>
</li>

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!

Regards,
Dimiter Madjarov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Menu
Asked by
Ehtesham
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or