GanesanSenthilvel solution works fine with little change
protected void buttonAddClick(object sender, EventArgs e)
{
try
{
XDocument xmlDoc = XDocument.Load(Server.MapPath("MyDoc.xml"));
xmlDoc.Element("Employees").Add(
new XElement("Employee",
new XElement("Name", txtName.Text),
new XElement("City", txtCity.Text),
new XElement("Age", txtAge.Text)));
xmlDoc.Save(Server.MapPath("MyDoc.xml"));
}
catch{}
}