treeData.ashx 829 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <%@ WebHandler Language="C#" Class="treeData" %>
  2. using System;
  3. using System.Web;
  4. public class treeData : IHttpHandler {
  5. public void ProcessRequest (HttpContext context) {
  6. context.Response.ContentType = "text/plain";
  7. context.Response.Write(@"[
  8. { text: '节点1',id:'1', children: [
  9. { text: '节点1.1',id:'2' },
  10. { text: '节点1.2' },
  11. { text: '节点1.3', children: [
  12. { text: '节点1.3.1' ,children: [
  13. { text: '节点1.3.1.1' },
  14. { text: '节点1.3.1.2' }]
  15. },
  16. { text: '节点1.3.2' }
  17. ]
  18. },
  19. { text: '节点1.4' }
  20. ]
  21. },
  22. { text: '节点2' },
  23. { text: '节点3' },
  24. { text: '节点4' }
  25. ]");
  26. }
  27. public bool IsReusable {
  28. get {
  29. return false;
  30. }
  31. }
  32. }