Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
10
Reply
when save xml error occur as it is being used by another pro
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Sourabh Choubey
8y
291
1
Reply
when save xml error occur as it is being used by another process.
XmlDocument XDOC = new XmlDocument();
XDOC.Load(System.Web.HttpContext.Current.Server.MapPath("~/XmlFiles/Blog.xml"));
XmlNode RootNode = XDOC.SelectSingleNode("//Blogs");
XmlNode childnode = XDOC.SelectSingleNode("/Blogs/IDs");
//check whether childnode exist or not.
if (childnode != null)
childnode.ParentNode.RemoveChild(childnode);
XmlElement XEle = XDOC.CreateElement("IDs");
XEle.SetAttribute("id", Convert.ToString(ID));
RootNode.AppendChild(XEle);
XDOC.Save(System.Web.HttpContext.Current.Server.MapPath("~/XmlFiles/Blog.xml"));(here getting error)
Post
Reset
Cancel
Answers (
10
)
Next Recommended Forum
I want to Convert a PHP SMS API code to ASP.net C# code
a simple example to bind a data from database to show in ddl