Tutorials to .com


ASP.NET Development Articles


Can't Find What You're Looking For?

Tutorials to .com » Dotnet » Development » Function to generate random passwords asp.net version

Function to generate random passwords asp.net version

Print View , by: iSee ,Total views: 6 ,Word Count: 286 ,Date: Sat, 22 Aug 2009 Time: 4:06 AM

Tofu http://www.asp888.net technical points

Function to generate random passwords asp.net version

asp we often will use the process to generate random passwords, this is very simple, tofu in learning
asp + of course, out of inertia, also would like to try to use the same approach, but unfortunately, as a result of using Replease version, although there is in helping the Randomize and Rnd function used, but in the actual process of debugging can not always, it seems that the official version of MS should be supported, how should we do now, is on. . .

No, tofu firm said to myself: So, after the efforts doubled, I finally found a way to have a asp +
Random object, therefore, allows for deeper investigation, I had this procedure done
<% @ 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 password, and then the light of our previous article asp + Send Email entirely manual, we can complete the randomly generated password, and fill in according to the mail address, will mail out password feature

Google
 

Rating: Not yet rated

Comments

No comments posted.