XmlDataSource

G

Guest

I am using an XmlDataSource to modify data in an xml file located on my web
server. I want to be able to rollback changes made to the XmlDataSource
since the last time I used the save method. How can I do this?
 
W

Walter Wang [MSFT]

Hi,

When you use DataFile property to specify a xml file for the XmlDataSource
control, it will load the xml file into an internal XmlDocument (you can
get this document by using the XmlDataSource's GetXmlDocument method). When
you call XmlDataSource.Save method, the internal XmlDocument will be saved
to the file specified by the DataFile property (the file will be
overwritten).

I understand your objective here is to "rollback" the changes made to the
XmlDataSource since the last time you used the save method.

Based on my understanding, to "rollback" the changes, you just need to
re-bind the XmlDataSource, this will make it to re-read from the xml file
specified by property DataFile.

I hope I haven't misunderstood anything. Please feel free to let me know if
there's anything unclear. Thanks.


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top