Posted on: 12/25/2013 1:36:59 PM | Views : 817

Hi , Simply this code doesnt work when i run  .I get no exception or any errors But xml file not created anywhere.What am i doing wrong.Thanks in advance

XDocument doc = new XDocument(new XDeclaration("1.0", "utf-8", null)); XElement persons = new XElement("Persons"); XElement[] el ={new XElement("PersonInfo",new XAttribute("ID",1), new XElement("Name","ali"), new XElement("Phone","222222")) }; persons.Add(el); doc.Add(persons); doc.Save("PhoneBook.xml", SaveOptions.None); Response.Write("ok");

Go to the complete details ...