Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: ASP.NET 2- Can't read data in XML file [Thread Next] Re: ASP.NET 2- Can't read data in XML fileTo: NULL Date: 4/4/2006 3:45:00 PM noone wrote: > YES works like charm. Fine. Some progress at least. > What do I have to do to enable Add, Delete, update functionality to the site > I created with VWD. > The buttons are there for Update an Deleting but they don't work, also how > do I Add to the XML file. As far as I understand that currently (and I am not too familiar yet with the new ASP.NET 2.0 controls) editing is not possible if you do a transform first, see <http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.xmldatasource(VS.80).aspx> which says "The XmlDataSource control is commonly used in read-only data scenarios where a data-bound control displays XML data. However, you can also use the XmlDataSource control to edit XML data. To edit the XML data, call the GetXmlDocument method to retrieve an XmlDataDocument object that is an in-memory representation of the XML data. You can use the object model exposed by the XmlDataDocument and XmlNode objects it contains or use an XPath filtering expression to manipulate data in the document. When you have made changes to the in-memory representation of the XML data, you can save it to disk by calling the Save method. There are some restrictions to the editing capabilities of the XmlDataSource control: The XML data must be loaded from an XML file that is indicated by the DataFile property, not from inline XML specified in the Data property. No XSLT transformation can be specified in the Transform or TransformFile properties." As the transform suggested earlier was necessary to get the GridView to display element contents at all I don't think there is an easy solution to use GridView and XmlDataSource to edit XML as you had. -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
