'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() |