c# - Problem saving XML File to web project in Silverlight -
i have application reads xml file information on projects , displays them in timelines. user has ability modify , add projects, want save xml file.
i have silverlight application displays data, , web project hosts xml file in it's clientbin folder. application gets xml file using webclient class:
webclient datasource = new webclient(); datasource.openreadcompleted += datasource_openreadcompleted; datasource.openreadasync(new uri("projectdata.xml", urikind.relative));
then in datasource_openreadcompleted method gets stream e.result object , reads xdocument object parse using linq. works fine.
now want save changes web project. have modified xml in xdocument object ready go ... , i'm not sure how write back.
there webclient.openwriteasync method, i'm not sure how use it. googling doesn't give clear results.
thanks,
andrew
silverlight code runs on client so...
you try making webservice accepts xml data , file name. have web service write file file system. please ensure use locks on file multiple users don't try write file @ same time.
Comments
Post a Comment