//******************************************************** //get student into view //******************************************************** public ActionResult GetStudent(string id) { Debug.Write(id); string qry = "select * from dbo.Student where Name = @a1"; List<object> parameterList2 = new List<object>(); parameterList2.Add(new SqlParameter("@a1", id)); object[] parameters12 = parameterList2.ToArray(); Student st1 = db.Students.SqlQuery(qry, parameters12).FirstOrDefault(); Student st = new Student { Name = st1.Name, CGPA=st1.CGPA, RegistrationNo=st1.RegistrationNo, ContactNo=st1.ContactNo, Email=st1.Email, Avatar=st1.Avatar }; return Json(new { student = st},JsonRequestBehavior.AllowGet); }
public ActionResult getDetails(Student er) { return View(); }