Reputation: 53
I am trying to do pretty basic XML save I did it before but somehow I am having trouble with an error.
System.NotSupportedException
.
XmlDocument xdoc = new XmlDocument();
xdoc.LoadXml(txtXmlControl.Text);
xdoc.Save(Server.MapPath("~/App_Code/controls" + DateTime.Now+".txt"));//error
xdoc.LoadXml(txtXmlProcess.Text);
xdoc.Save("~/App_Code/processes" + DateTime.Now + ".xml");//error
Basically both save trials are giving me same error.
Upvotes: 0
Views: 316
Reputation: 63105
xdoc.Save(Server.MapPath("~/App_Code/processes" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + ".xml"));
Upvotes: 0
Reputation: 53
I have just figured out that datetime.now makes the save name inappropriate for save. I changed it and solved the problem.. Thanks anyway..
Upvotes: 3