or
branch.Add().Text("Item " + child).HtmlAttributes(new { data_foo = childs.MyId })$("#btn").click(function () { var treeview = $("#treeview").data("kendoTreeView"); var treeSelect = treeview.select(); var passId = treeSelect.attr("foo"); window.location = "@Url.Action("Index","Content")" + "?MyIntegerParameter=" + passId;*});<li class="k-item" data-foo="30" data-uid="7f3430d0-4b01-4b08-b4be-1264d3ff16d3" role="treeitem" aria-selected="true" id="treeview_tv_active"> <div class="k-top"> <span class="k-in k-state-selected">This Is The Text</span> </div></li><!DOCTYPE html><html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <!-- Kendo UI Mobile CSS --> <link href="styles/kendo.common.min.css" rel="stylesheet" /> <link href="styles/kendo.default.min.css" rel="stylesheet" /> <link href="styles/kendo.mobile.all.min.css" rel="stylesheet" /> <!-- jQuery JavaScript --> <script src="js/lib/jquery/jquery.min.js"></script> <!-- Kendo UI Mobile combined JavaScript --> <script src="js/lib/kendo/kendo.all.js"></script> </head> <body> <div data-role="layout" data-id="myLayout"> <div data-role="header"> <div data-role="navbar"> <a id="btnBack" class="nav-button" data-align="left" data-role="backbutton">Back</a> <span data-role="view-title"></span> <a id="btnOK" class="nav-button" data-align="right" data-role="button" href="page2.html">Next</a> </div> </div> </div> <div data-role="view" data-title="Test App" data-layout="myLayout"> Welcome to the app </div> <script> var app = new kendo.mobile.Application(document.body, { transition: 'slide' }); </script> </body></html><!DOCTYPE html><html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <script src="js/app/page2.js"></script> <div data-role="view" data-layout="myLayout" data-model="p2Model" data-reload="true"> <ul data-role="listview" data-template="listItem" data-bind="source: dsList"></ul> </div> <script id="listItem" type="text/x-kendo-template"> #: FirstName # #: LastName # </script> </body></html>var p2Model;if (p2Model == null){ p2Model = kendo.observable({ dsList: new kendo.data.DataSource({ data: [{id: 1, FirstName: "Bilbo", LastName: "Baggins"}, {id: 2, FirstName: "Malcolm", LastName: "Reynolds"}] }) });}