The following is the code fragment: <% Function Makepassword (byval Maxlen) Dim Strnewpass DIM Whatsnext, Upper, LOWER, Intcounter Randomize For intcounter = 1 to maxlen Whatsnext = int ((1-0 1) * RND 0) If whatsnext = 0 then upper = 90 LOWER = 65 Else upper = 57 LOWER = 48 End if StrNewpass = StrNewpass & Chr (inchete -LOWER 1) * RND LOWER) Next Makepassword = Strnewpass end function 'Specify the password length, and call the function response.write makepassword (16) %> |