正在阅读:ASP.NET中不定级动态菜单的实现ASP.NET中不定级动态菜单的实现

2004-09-01 10:24 出处:CSDN 作者:xiangwa 责任编辑:linjixiong


  'strid = strid1
  'strname = strname1
  i = Len(strid)
  k = j - i
  strid = strid1
  strname = strname1
  Select Case k
  Case Is > 0
  txtwriter.WriteLine("<treenode text='" & strname & "' NavigateUrl='xxcb_add.aspx?classname=" & strname & "" & strand & "classid=" & strid & "'   Target='main1'/>")
  'txtwriter.WriteLine("</treenode>")

  m = Len(strid) / 2

  While m > 1
  txtwriter.WriteLine("</treenode>")
  m = m - 1
  End While
  Case Is = 0
  txtwriter.WriteLine("<treenode text='" & strname & "' NavigateUrl='xxcb_add.aspx?classname=" & strname & "" & strand & "classid=" & strid & "'   Target='main1'/>")
  'txtwriter.WriteLine("</treenode>")
  m = Len(strid) / 2

  While m > 1
  txtwriter.WriteLine("</treenode>")
  m = m - 1
  End While
  Case Is <= 0
  txtwriter.WriteLine("<treenode text='" & strname & "' NavigateUrl='xxcb_add.aspx?classname=" & strname & "" & strand & "classid=" & strid & "'   Target='main1'/>")
  'txtwriter.WriteLine("</treenode>")

  m = Len(strid) / 2

  While m > 1
  txtwriter.WriteLine("</treenode>")
  m = m - 1
  End While

  End Select
  txtwriter.WriteLine("</TREENODES>")
  txtwriter.Close()

 


  这样menuone.txt就按要求生成了菜单源文件。
  如有更好的办法,请与我联系谢谢。QQ:149592886


察看评论详细内容 我要发表评论
作者笔名 简短内容 发表时间
:
键盘也能翻页,试试“← →”键

关注我们

最新资讯离线随时看 聊天吐槽赢奖品