protected void btnSubmit_Click(object sender, EventArgs e) { XmlDocument xmldoc = new XmlDocument(); xmldoc.Load(Server.MapPath("news.xml")); XmlElement parentelement = xmldoc.CreateElement("Comments"); XmlElement name = xmldoc.CreateElement("Name"); name.InnerText = txtName.Text; XmlElement Description = xmldoc.CreateElement("Description"); Description.InnerText = txtComments.Text; XmlElement date = xmldoc.CreateElement("Date"); date.InnerText = DateTime.Now.ToString(); parentelement.AppendChild(name); parentelement.AppendChild(Description); parentelement.AppendChild(date); xmldoc.DocumentElement.AppendChild(parentelement); xmldoc.Save(Server.MapPath("news.xml")); Clear(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)