Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > Is there a way to do 2-way binding with .Net XmlDataSource Controls?
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 18th February 01:27
bill nicholson
External User
 
Posts: 1
Default Is there a way to do 2-way binding with .Net XmlDataSource Controls?


Is there a way to do 2-way binding with .Net XmlDataSource Controls?
It looks like only one-way binding is possible. I have that working,
hooked to a GridView control and that works well. I can also extract
the rows from the GridView control programatically. Can revise the
rows and write them back to the XML file using the XmlDataSource
control? Or, do I have to use the XMLReader and XMLWriter classes?

Does anyone have a good example of how to create an ASP .Net UI to
read/edit/write XML files?

Thanks,

Bill
Cincinnati, OH USA
  Reply With Quote


  sponsored links


2 18th February 01:28
phil h
External User
 
Posts: 1
Default Is there a way to do 2-way binding with .Net XmlDataSource Controls?


Hi Bill

I have used XML data files in projects that do writing as well as
reading too. However the XMLDataSource control won't cut it. You need
to use an ObjectDatasource and put all the XML handling routines in a
code module (class file) stored in the App_Code directory. You can
then write select, update, insert, delete methods and link them the
ObjectDatasource (using the Configure Datasource wizard).

The reason for the lack of support for write operations from
XmlDataSource is because of limitations using XML as a read/write
datasource in a shared data access environment (i.e. no support for
record locking etc). There are cir***stances when it's viable, e.g. if
the XML data acts as a read-only source for ordinary users but might
be updated and maintained by a single administrator using web based
tools. Otherwise consider using SQL (or possibly Ms Access) instead.
Remember SQL server 2005 Express is free.

Phil H
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666