Hi,
In application I placed a adrotator control, I have taken the one xml file. When the new user is registered with my website I need to add one to the xml file. I after adding that node, it is asking xml file is modified outside the project, do wnat to reload it. Every time it is asking that. once we dipoly it is not possible to do this. how to update the xml file.
to add node I wrote the code like this XmlDocument doc = new XmlDocument(); doc.Load(Server.MapPath(@"AdRotatorFiles.xml")); XmlNode node = doc.CreateNode(XmlNodeType.Element, "Ad", null); XmlNode ImageUrl = doc.CreateElement("ImageUrl"); ImageUrl.InnerText = imagepath; XmlNode NavigateUrl = doc.CreateElement("NavigateUrl"); NavigateUrl.InnerText = "http://219.91.199.136/kissbow/home.aspx"; node.AppendChild(ImageUrl); node.AppendChild(NavigateUrl); XmlNodeList l = doc.GetElementsByTagName("Advertisements"); l[0].AppendChild(node); doc.Save(Server.MapPath(@"AdRotatorFiles.xml"));
|
| Author: Rajesh(March-2008 Winner) 30 Aug 2008 | Member Level: Gold | Rating: Points: 2 |
To enable it, you'll need to add:
webwork.configuration.xml.reload=true
to webwork.properties
|
| Author: krishnakumari 30 Aug 2008 | Member Level: Bronze | Rating: Points: 3 |
Hi rajesh,
can you please provide me the clear dtatement. If don't mine I need full statement, what i need to add and where to add.
thank you very much.
|
| Author: krishnakumari 30 Aug 2008 | Member Level: Bronze | Rating: Points: 0 |
which name space I have to add in asp with c#
|