protected void Page_Load(object sender, EventArgs e) { string name = Request["name"]; string email = Request["email"]; string phone = Request["phone"]; string content = Request["content"]; ContactManager cm = new ContactManager(); ContactTBx contact = new ContactTBx(); contact.Name = name; contact.Email = email; contact.Phone = phone; contact.CreateDay = DateTime.Now; contact.BodyContent = content; contact.Status = 1; cm.AddNew(contact); cm.Save(); Response.Write(1); }
protected void Page_Load(object sender, EventArgs e) { string name = Request["name"]; string phone = Request["phone"]; string email = Request["email"]; string content = Request["content"]; string ip = Request["ip"]; ContactManager CM = new ContactManager(); ContactTBx addnewcontact = new ContactTBx(); addnewcontact.Name = name; addnewcontact.Email = email; addnewcontact.Phone = phone; addnewcontact.Ip = ip; addnewcontact.BodyContent = content; addnewcontact.CreateDay = DateTime.Now; addnewcontact.Status = 1; CM.AddNew(addnewcontact); Response.Write(1); }