Latest Post


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

Description:
I want to add change password functionality for logged in users. To change password users have to enter current password, after that new password and confirm the new password.
  

Implementations:
Please check the previous post Create login form and maintain authenticated user’s detail in MVC application.

Model


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.


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


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:

Here in this article I am going to explain how to implement infinite scroll using Jquery in asp.net MVC application.

Description:
I am showing list of country in application. Instead of pagination want to show all records on scroll. To fulfill this requirement I am using Jquery.

Implementation:

Model class:
   public partial class CountryMaster
    {
        public int ID { get; set; }
        public string Name { get; set; }
        public string CountryCode { get; set; }
    }

Add Controller
Add an empty controller to project.

Complete source code of Controller:

In this article I am going to explain how to crop image using Iedit Jquery and save to folder in MVC application.

Description:
In MVC application, want to add functionality to crop the image. When user’s uploading profile image, they can crop the uploaded image and it will be save to image folder. I am using IEdit Jquery plugin to crop the profile image. You can download the IEdit Jquery from here.

Implementation:
Add Controller:
Add an empty controller to project. Create action to upload profile pic.

In this article I am going to explain how to crop image and save cropped image to folder in MVC using Jquery.

Description:
In MVC application, want to add functionality to crop the image. When user’s uploading profile image, they can crop the uploaded image and it will be save to image folder. I am using IEdit Jquery plugin to crop the profile image. You can download the IEdit Jquery from here.

Implementation:

Add Controller:

In this article I am going how to upload file’s on button click using Dropzone JS plugin in asp.net application.

Description:
I want to upload multiple files using select or drag & drop in asp.net application on submit button click. I am using Dropzone js to upload file.

Implementation:
I have created a table GalleryImages to save file’s name and path.

Id
int
Filename
varchar(MAX)
FilePath
varchar(MAX)
Is_Deleted
bit

Create procedure to save detail to database table.

In this article I am going to explain how to send email with attachment using Gmail SMTP from asp.net MVC application.

Description:
I want to send email with attachment using Gmail account.

Implementation:
Open the web.config file of project. Set key in Appsettings. After that mailsettings as shown below:
<appSettings>
    <add key="Email" value="Emailaddress@gmail.com"/>
  </appSettings>
  <system.net>
    <mailSettings>
      <smtp deliveryMethod="Network">
        <network enableSsl="true" port="587" host="smtp.gmail.com" userName=" Emailaddress@gmail.com" password="password"/>
      </smtp>
    </mailSettings>
  </system.net>

In this article I am going to explain how to send email with attachment using Gmail account in MVC application.

Description:
I want to send email with attachment using Gmail account.

Implementation:

Open the web.config file of project. Set key in Appsettings. After that mailsettings as shown below:
<appSettings>
    <add key="Email" value="Emailaddress@gmail.com"/>
  </appSettings>
  <system.net>
    <mailSettings>
      <smtp deliveryMethod="Network">
        <network enableSsl="true" port="587" host="smtp.gmail.com" userName=" Emailaddress@gmail.com" password="password"/>
      </smtp>
    </mailSettings>
  </system.net> 

In this article I am going to explain how to lock the user for day after 3 invalid login attempt in asp.net.

Description:
I want to lock the users for a day after 3 invalid login attempt. For example if user try to login on 25 November with 3 wrong password attempt, he/she will be locked for 25 November. He/she can’t login even enter correct password. He will be able to login on 26 November.  

Implementation:
I have created a table user_login


ASP.NET : Lock user for  day after 3 invalid login attempt

In this article I am going to explain how to show confirmation message before submit, update or delete record in MVC.

Description:
I want to show a confirmation message before perform any task like submit, update or delete the data. To implement this functionality you have to set onclick action of button or actionlink.

Implementation:
You have two different ways to implement this. First simply on button or actionlink use confirm as shown below:
<input type="submit" value="Create" onclick="return confirm('Are you sure want to create user?')" />       

Second using Jquery. Create Jquery function and call that on Onclick event as shown below:
<script>
    function Confirmmessage() {
        var alert = confirm("Are you sure want to create user?");
        if (alert) {
            return true;
        } else {
            return false;
        }
    }
</script>
Button:
<input type="submit" value="Create" onclick="return Confirmmessage()" />

I have create working example of create users for application.
Model (Login.cs)

MKRdezign

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget