If j = 0 Then j = Len(Trim(objRead.Item("classid"))) Else strid = strid1 strname = strname1 i = Len(Trim(objRead.Item("classid"))) k = i - j Select Case k Case Is > 0 txtwriter.WriteLine("<treenode text='" & strname & "' NavigateUrl='xxcb_add.aspx?classname=" & strname & "" & strand & "classid=" & strid & "' Target='main1'>") Case Is = 0 txtwriter.WriteLine("<treenode text='" & strname & "' NavigateUrl='xxcb_add.aspx?classname=" & strname & "" & strand & "classid=" & strid & "' Target='main1'/>") Case Is < 0 txtwriter.WriteLine("<treenode text='" & strname & "' NavigateUrl='xxcb_add.aspx?classname=" & strname & "" & strand & "classid=" & strid & "' Target='main1'/>") 'txtwriter.WriteLine("</treenode>") m = k While m < 0 txtwriter.WriteLine("</treenode>") m = m + 2 End While End Select
j = Len(Trim(objRead.Item("classid"))) End If strid1 = Trim(objRead.Item("classid")) strname1 = Trim(objRead.Item("classname")) End While |