控件数据绑定总结

一、下拉菜单

var categoryItems = SelectListItems.FromQuery<Category>(r => r.Status == Status.Normal, r => r.Name, r => r.Id);
 <select asp-for="Status" asp-items="categoryItems" class="form-control"></select>

 二、百度编辑器

   <editor for='Intro'></editor>

 

三、树形带单

 <tree for="PartentId" source="ZKCloud.Shop.Category.Domain.Entities.Category" root-field="PartentId" root-value="00000000-0000-0000-0000-000000000000" displayfield="Name" valuefield="Id" ></tree>

 

posted on 2016-07-18 22:26  ZKCloud  阅读(199)  评论(0编辑  收藏  举报