C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Xml file reloading


Posted Date: 30 Aug 2008      Total Responses: 3

Posted By: krishnakumari       Member Level: Bronze     Points: 1


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"));




Responses

Author: Rajesh(March-2008 Winner)    30 Aug 2008Member Level: GoldRating:     Points: 2
To enable it, you'll need to add:

webwork.configuration.xml.reload=true

to webwork.properties



Author: krishnakumari    30 Aug 2008Member Level: BronzeRating:     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 2008Member Level: BronzeRating:     Points: 0
which name space I have to add in asp with c#


Post Reply
You must Sign In to post a response.
Next : how to open pdf doucmnet in another broswer from select button of gridview in asp.net
Previous : Plz give me some idea regarding iis settings
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

it support

Contact Us    Privacy Policy    Terms Of Use