Friday, March 16, 2018

How to generate numeric and alphanumeric OTP (one time password) in MVC application


Here in this article I am going to explain how to generate numeric and alphanumeric OTP (one time password) in MVC application.

Description:
I want to generate OTP. OTP can be numeric or alphanumeric and it is used widely to validate the user’s information such as mobile number, in banks for transaction etc.

Implementation:

Add controller
Add an empty controller to project. Create 3 action to generate OTP, one to generate numeric and 2nd one alphanumeric.

Monday, March 12, 2018

Generate random password in MVC application


In this article I am going to explain how to generate random password in MVC application.


Description:
I want to generate strong random password for users when they registers to website. Here in this article I am going to generate password using 2 ways.


Implementation:
Add an empty controller to project. I have create action Generatepassword.

  public ActionResult Generatepassword()
        {
            return View();
        }

Using Membership Generate method

ASP.NET MVC : Display data in 2 or more columns


In this article I am going to explain how to display data in 2 or more columns in MVC application.

Description:
I want to display data in 3 columns. To display data 2 or more columns we have 2 approaches. One use the Bootstarp, if use the bootstrap it adjust itself. 2nd one using the loop, run the loop and differentiate them like odd and even. For 2nd one check this article.

Implementation:
Model

Thursday, March 8, 2018

MVC : Generate random OTP (one time password)


In this article I am going to explain how to generate random OTP (one time password) in asp.net MVC application.

Description:
I want to generate OTP. OTP can be numeric or alphanumeric and it is used widely to validate the user’s information such as mobile number, in banks for transaction etc.

Implementation:

Add controller
Add an empty controller to project. Create 3 action to generate OTP, one to generate numeric and 2nd one alphanumeric.

Complete code of controller:

Friday, March 2, 2018

How to show data in 2 columns in MVC application


In this article I am going to explain how to show data in 2 columns in MVC application.

Description:
I am displaying list of all countries in MVC application one record per row but I want to display data in 2 columns. 2 records pre row.

Implementations:

Model