1.domain类 package com.xiaostudy.domain; public class User { private int id; private String username; private String password; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getUsername() { return username;
public class Person { public string Name{get;set;} public string Phone{get;set;} } view层 @model Model.Person @{ ViewBag.Title = "Add";} @using (Html.BeginForm("doAdd","person",FormMethod.Post) { } 1.通过request.form获取表单数据 pu