This question is locked. New answers and comments are not allowed.
I can add Title Link in View
But I can't Add Title Link in Controller
How to add title link in controller ?
Thanks for any help
//View@(Html.Telerik().TreeView() .Name("TreeView") .BindTo((IEnumerable<B2BThai.ProductCate.Contract.Category>)ViewBag.TreeViewUC, (item, Cate) => { item.Text = Cate.CategoryName; item.Value = Cate.CategoryID.ToString(); item.LoadOnDemand = Cate.ChildQty > 0; item.Expanded = true; item.Visible = true; item.ActionName = "List"; item.ControllerName = "Member"; item.LinkHtmlAttributes.Add("title", Cate.CategoryName); // Add Title This Line item.Url = Url.Action("List", "Member", new { id = Cate.CategoryID , p = Cate.ParentCategoryID }); }) .DataBinding(dataBinding => dataBinding.Ajax().Select("LoadTreeView", "Member")) // ส่งเข้า action= LoadTreeView , Controller = ProductCate /* .DataBinding(dataBinding => dataBinding.Ajax().Select("LoadTreeView", "Member", new { id = (string)ViewData["id"] })*/ ) @(Html.Telerik().ScriptRegistrar().DefaultGroup(group => group.Combined(true).Compress(true)))But I can't Add Title Link in Controller
//ControllerIEnumerable nodes = from item in data where item.ParentCategoryID == parentId || (parentId == null) select new TreeViewItem { Text = (item.CategoryName.Length > maxword) ? item.CategoryName.Substring(0, maxword)+"..." : item.CategoryName, Value = item.CategoryID.ToString(), LoadOnDemand = item.CategoryLevel < 2, Expanded = true, Url = Url.Action("List", "Member", new { id = item.CategoryID, p = item.ParentCategoryID}), ImageUrl = "/Content/Default/Images/logo_B2B.gif", //LinkHtmlAttributes.Add = {new ("title", "Happy")}, //LinkHtmlAttributes.Add = new {("title", "Well")} //LinkHtmlAttributes.Add = new ("title", "Excellent") //LinkHtmlAttributes.Add("title", "Good") //LinkHtmlAttributes = new {(title = "Best")} //LinkHtmlAttributes = {{ "title", "tooltip" }, { "style", "background:red" } } //LinkHtmlAttributes = LinkHtmlAttributes.Add("title","VeryGood"), //LinkHtmlAttributes["title"] = item.CategoryName, }; return new JsonResult { Data = nodes };How to add title link in controller ?
Thanks for any help