public ActionResult AdminDetail(AdminCredential user) { //Pass the data to store the record into the table DataTable tbl = new DataTable(); tbl = dbC.CheckLogin("select * from AdminCredential where UserDetail='" + user.UserDetail + "'and PasswordDetail='" + user.PasswordDetail + "'"); if (tbl.Rows.Count > 0) { return(View("AdminZone")); } else { return(View("invalid")); } }