Home
Developer Blog
Ajax effects
CSS examples
Freelance jobs
Hot IT Jobs
Hot scripts
Code samples
Web hosting directory
Lotus Notes FAQ
See the new scripts recently added to Dynamic Drive.
Click here
.
Original, practical
CSS codes and examples
such as CSS menus for your site.
Search code samples
Keyword
All Categories
ASP
CSS
Dhtml
Html
Javascript
PHP
Code Samples
ASP
CSS
Dhtml
Html
Javascript
PHP
LOGIN HERE
Username
Password
Signup Now
Forgot Password
Verify Signup
ASP >> General
How can I generate a random password?
Visitor Ratings (0) :
Description
Try the following function.
Code
Select All
function GetPassword(intStrLength) dim x, GotRand, intRand, strOut Randomize for x = 1 to intStrLength Do Until GotRand = True intRand = Int((90 - 48 + 1) * Rnd + 48) ' 48 to 57 is for numbers ' 65 to 90 is for uppercase ' 97 to 122 is for lowercase If InStr(1, "ABCDEFGH JK MN PQRSTUVWXYZ 23456789", Chr(intRand), 1) Then GotRand = True End If Loop strOut = strOut & Chr(intRand) GotRand = False next GetPassword = strOut End Function
Rate this Resource
0
1
2
3
4
5
6
7
8
9
10