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

Pass textbox value through the .Action() part of a kendo Menu

2 Answers 62 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Suk
Top achievements
Rank 1
Suk asked on 21 Mar 2015, 11:22 AM
I have a text box in a partial page with id="txtName", whose value I need to pass to another page(through kendo menu's action part, which is in layout page)...
My code in the layout/master page is as-

menu.Add().Text("text").Action("Index", "Controller", new { area = $("#txtName").val() }); Shows error...

Is there a way to call a javascript funtion and return the textbox value. If so then please let me know??How am I supposed to do that...
I am not an expert in javascript or ASP.NET...

2 Answers, 1 is accepted

Sort by
0
Accepted
Petur Subev
Telerik team
answered on 25 Mar 2015, 04:08 PM
Hello Suk,

I am afraid this is not possible. The Menu is initialized when the page is loaded and the URLs for the different items cannot contain any dynamic logic like you tried.

Regards,
Petur Subev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Suk
Top achievements
Rank 1
answered on 26 Mar 2015, 04:00 PM
Thank you for your reply Petur....
Tags
General Discussions
Asked by
Suk
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Suk
Top achievements
Rank 1
Share this question
or