public IActionResult Test2(int id) { Test2Model model = new Test2Model() { Id = id }; return(PartialView(model)); }
public ActionResult Test2(Test2Model model) //public ActionResult Test2(string name,int age) //public ActionResult Test2(FormCollection fc) { //return Content(name + age); return(Content(model.Name + model.Age)); /* * string name = fc["name"]; * string age = fc["age"]; * return Content(name + age);*/ }