Hi In my application i have created a text file in isolated storage and now i want to display it.Can any one please help me that which is the best way to display this file like in other platforms(android etc) we can save text file in sd card and open this text file in html viewer.Can we display our file like this in windows phone7? if not the please suggest me any other alternative.Thanks in advance..
Share
Ku6opr’s answer is accurate to display the content of the file in the app that created it, but it sounds from your comment that you want to save a file in your application, and make it available to other applications (e.g. IE on the device). Correct me if I am wrong.
This is not possible on WP7 without going out to an external service / website to transfer the data. WP7 applications are sandboxed to stop applications accessing each other’s data (You wouldn’t want an app you download from the Marketplace to be able to access data that your banking app saves in Isolated storage, would you?). This applies to first-class apps such as IE as well.
If you want to view the contents of the file as HTML, You can embed a WebBrowser control in your app and display the content in there. As an example (based on the above answer)…
The NavigateToString() method allows you to display arbitrary content in your web browser control.