Wednesday, 9 December 2009

The new chapter..

Its been a while since a new post on the blog , a lot has happened meanwhile... but not to spoil all the details in one post i will post as we start along.

Today i am working on developing a site in ASP.NET, and i am currently doing a form that has a reset pasword link. I have created a random generating password class that could be useful.
Here it is

public class reset_password
{
public string valoare = string.Empty;

public reset_password()
{
string capitals = "ABCDEFGHIJKLMNOPQRSTUVWXTZ";
string small = "abcdefghijklmnopqrstuvwxyz";
string nr ="0123456789";
string ret = string.Empty;

Random rand = new Random();
for (int i = 0; i < 4; i++)
{
ret += capitals[rand.Next(0, 24)];
ret += small[rand.Next(0, 24)];
ret += nr[rand.Next(0, 9)];
}
valoare = ret;
}

}

will get back to you soon

Cheers,