开发者

Saving XML files to clientbin

Greetings,

I'm trying to read and save to a XML f开发者_JAVA百科ile within a client bin

I've managed to find out how to read a xml file in the clientbin.

Now I want to save to it aswell, when saving, the file already exists in the clientbin.

Uri url = new Uri("myXml.xml", UriKind.Relative);
WebClient client = new WebClient();
#region DownloadStringCompleted
client.DownloadStringCompleted += (s, ea) =>
{
   //bla
}

If this is not possible due to limitation then please provide me with a way to copy the file to local machine and be able to change it there.

Many thanks in advance


What are you trying to do is achievable by using an HttpHandler in server-side, and by creating a HttpWebRequest in client-side that sends to the handler all the bytes contained in the XML.

There is a good article on CodeProject on how to implement a FileUploader in MVVM. Try to look at the ending part.

Anyway this is not the only solution, if you prefer you can create a WCF Service that do the same job.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜