About Me

My photo
Nadiad, Gujarat, India
Hi Friends I am Vipul Soni, an Innovative web Designer & Developer with Excellent skills who thrives on challenges and is passionate for all areas of web Design & Development.

Tuesday, 1 February 2011

how to generate uniq random password in c#?

Use the following code : -
-----------------------------------

string passStr = Convert.ToString(System.Guid.NewGuid());

        string[] pssSaprate = passStr.Split('-');

        string pass = passSaprate[0];
        Response.Write(pass);
-----------------------------------

you can call it by function

then replace  : return ranuid;

instead of  : Reponse.Write(pass)


Vipul Soni

0 comments:

Post a Comment