Hi everyone , i make an application using Entity frame work (database first approach),
Whenever i click on link to update the data and insert new data the last field is embed with first field and itself is null, i cannot understand what the problem is that, sample code is given below

Action method Update:

Java
public ActionResult Update(int id)
        {
            StudentEntities cx = new StudentEntities();
            var q = cx.Infoes.Find(id);
            return View(q);
        }

View Update :

Code
@{
    Layout = null;
}

<!DOCTYPE html>

   
   
   
       
           
               
                    Name:
                   
               
               
                    Age:
                   
               
               
                    Address:
                   
               
               
                    Interest
                   
               
               
                   
                    Go back
                   
               
                
           
       
        
   


Method update:

 [HttpPost]
        public ActionResult update()
        {
            int Id = int.Parse(Request["ID"]);
            string Name = Request["Name"];
            int Age = int.Parse(Request["Age"]);
            string Address = Request["Address"];
            string Interest = Request["Interest"];

            StudentEntities cx = new StudentEntities();
            var q = cx.Infoes.Find(Id);
            q.Name = Name;
            q.Age = Age;
            q.Address = Address;
            q.Interest = Interest;
            cx.SaveChanges();
            var l = cx.Infoes.ToList();
            return View("Index", l);

        }