Monday 23 April 2018

STRING EQUALS() METHOD WITH LOGIN FORM


package javaapplication38;

import java.util.Scanner;


public class JavaApplication38 {


    public static void main(String[] args)
    {
       int attemp=3;
        String userid="salman",password="xyz123";
        Scanner sc=new Scanner(System.in);
        String uid,pwd;
       
        System.out.println("Enter you email id to use this software...........");
        uid=sc.next();
        if (uid.equalsIgnoreCase(userid)==true)
        {
            while(attemp>=0)
            {
              System.out.println("Enter your password :");
                pwd=sc.next();
                if (pwd.equals(password))
                {
                   
                    System.out.println("You are successfully login......."); 
                    break;
                }
                else 
                {
              System.out.println("Invalid Password.....\nyou have "+attemp+" left ");
              attemp--;
                }
            }
           
           
           
        }
        else
        {
            System.out.println("Invalid id.....\nyou have "+attemp+" left ");
         
        }
       
    }
   
}

Pass Dynamically Added Html Table Records List To Controller In Asp.net MVC

Controller Code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ...