public ActionResult verfyLogin(LoginField login) { //Pass the data to store the record into the table DataTable tbl = new DataTable(); tbl = login.Login("select * from Admin where Name='" + login.userName + "'and Password='******'"); if (tbl.Rows.Count > 0) { return(View("Valid")); } else { return(View("inValid")); } }