the pursuit of efficiency, direct access to the subject bar ... ..
Effect:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6F/6F/wKioL1WcsmzgJshwAABQgMEGEMc933.jpg "title=" Jfbn09pozrqcbrl8[32s (ti.png "alt=" Wkiol1wcsmzgjshwaabqgmegemc933.jpg "/>
Front Code
<linkhref= ". /.. /_frontend/3rd/miniui/miniui.css "rel=" stylesheet "/>
<scriptsrc= ". /.. /_frontend/3rd/miniui/miniui.js "></script>
<input class= "mini-treeselect" id= "ipajly" runat= "Server" url= "data/ajaxservice.ashx? method= Geteventsource&userid= "textfield=" "valuefield=" "parentfield=" "Expand style=" width:100%; "/>
Brief analysis:
Textfield : Display text values
Valuefield : ID
ParentField : Parent class encoding
Expand Expand all By default
Background code
need to add Newtonsoft.Json.dll References
add a generic handler ajaxservice.ashx
Public Voidprocessrequest (HttpContext context)
{
Context. Response.ContentType = "Text/plain";
String method =context. Request.getrequestvaluebyparam ("method");
if (method. ToLower () = = "Geteventsource". ToLower ())
{
Geteventsource (context);
}
}
Public Voidgeteventsource (HttpContext context)
{
DataTable dt = new DataTable ();// get the data you need to bind
context. Response.Write (Newtonsoft.Json.JsonConvert.SerializeObject (DT));// serialization
}
Mini-treeselect Specific Attribute method description :
Reference URL: Http://www.miniui.com/docs/api/index.html#ui=treeselect
Tree-shaped drop-down box for Mini-treeselect