Save silverlight files




















Active Oldest Votes. Improve this answer. End of day it looks like I'm fighting http spec and it's lack of a multiple file download capability. The Mime message format already specifies a format which is compatible with http for multi-file content in a single entity.

The problem is that there is no browser support for such a download. Add a comment. The other option is to zip the files with a single SaveFileDialog call. There are no other Silverlight oriented solution. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Improve this answer. I've made a test to save the file in MyDocuments but this give me the same error, but your answer give me a better unsertand about silverlight.

It's better to use File. WriteAllBytes string path, byte[] data. Vahan Hakobyan Vahan Hakobyan 69 5 5 bronze badges. Sign up or log in Sign up using Google.

Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Stack Gives Back Thanks for the post. I am half done wtih your answer. Now i knew the file which I had to save but the problem is, it doesnt work with SilverLight 2. Hi guys, I am trying to the same thing here but the webpage I am trying to do it from has a lot of JS. Anyone care to shed some light please? Silverlight Developer Center.

Sign in. United States English. Home Library Learn Downloads Forums. Ask a question. Quick access. In any case, the only way to write data is to use the Stream returned by the dialog. NET stream , so we can wrap it in a StreamWriter , to write text into it. Obviously, you are always picking an existing file rather than a new one, but there is another important difference.

It offers a property called MultiSelect. If you set that to True , the user can choose multiple files. This means the dialog needs a slightly more complex API. We need to expand the code.

Depending on whether the dialog is in single file mode, or MultiSelect mode, you use either its File , or Files property. Here, in the below given example, we are in single file mode.

In multiselect mode, we would use Files instead, which returns a collection of FileInfo objects. The second approach to file access as mentioned above is to use the FileStream class, or related types in the System. IO namespace directly.



0コメント

  • 1000 / 1000