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

Thread is closed for posting
3 posts, 1 answers
  1. Suk
    Suk avatar
    15 posts
    Member since:
    Mar 2015

    Posted 21 Mar 2015 Link to this post

    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. Answer
    Petur Subev
    Petur Subev avatar
    1882 posts

    Posted 25 Mar 2015 Link to this post

    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.

    Petur Subev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Suk
    Suk avatar
    15 posts
    Member since:
    Mar 2015

    Posted 26 Mar 2015 in reply to Petur Subev Link to this post

    Thank you for your reply Petur....
Back to Top