日期:2014-05-17 浏览次数:20975 次
@{ if (IsPost) { var forenames = Request["forenames"]; var surname = Request["surname"]; var dateOfBirth = Request["dateOfBirth"]; var emailAddress = Request["emailAddress"]; var Job = Request["Job"]; var db = Database.Open("DataExample"); var sqlCommand = "INSERT INTO Employees " + "(Forenames, Surname, DateOfBirth, EmailAddress, Job) " + "VALUES (@0, @1, @2, @3, @4)"; db.Execute(sqlCommand, forenames, surname, dateOfBirth, emailAddress, Job); Response.Redirect("~/successful"); } }