Http://www.asp888.net bean curd technology station
Asp.net version of the password generated by the random function
We often generate random passwords in the process of using asp. This is very simple.
In the process of asp +, I tried to use the same method out of inertia, but unfortunately
It is a Replease version. Although Randomize and Rnd functions are used in help, they have been debugged
In the process is always unable to pass, it seems that in the official version of the MS should be supported, now what to do, is it...
No, tofu resolutely said to myself: after a review of the efforts, I finally found another method, there is one in asp +
Random object, so I came up with this program.
<% @ Page language = "VB" %>
<% @ Import namespace = "System. Random" %>
<Script language = VB runat = server>
Function GetRndPass
Dim intRnd as new Random
Dim strTemp as string
Dim I as integer
For I = 0 to 6
I = intRnd. Next (0, 9)
StrTemp = strTemp + cStr (I)
Next
End function
</Script>
In this way, we get a 7-bit password, and then refer to our previous article asp + complete Email sending manual, we can generate a random password based on the user
Enter the Mail address to mail the password out.