how to generate random password in asp.net

how-to-generate-random-password-in-asp-net

how to generate random password in asp.net

 Below program show how to generate random password using c# console application. This program can be use anywhere to create the random password .

 
Tags |  how to generate random password in asp.net using c#,c# password generator alphanumeric,asp.net identity generate random password,.net core generate password,.net core generate random password,asp.net core generate random password

For more details about  random class you can use below site.
 
 
Go for  Client side Multiple parameter post :
 
Purpose

using this feature ,anyone can increase the security of a website by taking the process out of the hands of the user.
This tutorials show a simple password generation technique.


Generating random password is the another way of provide the secure login. it help to increase the security of site.


using System;

using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace Generate_Randon_password
{
    class Program
    {
        static void Main(string[] args)
        {
            System.Random myRandom = new System.Random();
            int myLength = myRandom.Next(6, 10);
            string myPassword = “”;
            while (myPassword.Length < myLength)
            {
                int myPick = myRandom.Next(1, 3);
 
                if (myPick == 1)
                {
                    // Add a random number to the string.
                    myPassword += (char)myRandom.Next(48, 57);
                }
                else if (myPick == 2)
                {
                    // Add a random lower case letter to the string.
 
                    myPassword += (char)myRandom.Next(97, 122);
                }
                else if (myPick == 3)
                {
                    // Add a random upper case letter to the string.
 
                    myPassword += (char)myRandom.Next(65, 90);
                }
            }
 
            Console.WriteLine(“Your Random PassWord is : “+myPassword.ToString());
            Console.ReadKey();
        }
    }
    }
 
how to generate random password in asp.net
how to generate random password in asp.net

 for Reference : how to generate random password in asp.net

convert html to pdf using javascript

SHARE THIS

Leave a Reply

Your email address will not be published. Required fields are marked *