TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sourabh Choubey
NA
236
43.6k
when save xml error occur as it is being used by another pro
Aug 3 2016 2:39 AM
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)
Reply
Answers (
10
)
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