0
Answer

How to avoid the alert when an XML File is being modified

sri sri

sri sri

16y
2.6k
1

Hi,

I am saving the content from XMLFile1.xml to XMLFile2.xmll using the below code.

XmlDocument Xdoc=new XmlDocument( );

Xdoc.Load("XMLFile1.xml");

Xdoc.Save("XMLFile2.xml");

This code is working fine but after i finish running my code I am getting an alert saying

"This file is modified out of the source editor.Do you want to reload it". If I click "yes" only, the file is being saved otherwise not.

Is there any way to avoid that alert because, if the end users of this application will click "NO" or close the window, the application will throw an error.

Can anyone give me the code or any related link to this???

Thank You.