-
September 16th, 2009, 03:52 AM
#1
IsolatedStorageFileStream Enquiry
Hey all, I got a question in relation to the IsolatedStorageFileStream.... I was wondering how I capture the path of the document after my textbox displays the document name.
OpenFileDialog dlg = new
OpenFileDialog();
dlg.Filter = @"Picture File (*.jpg; *.jpeg; *.gif; *.bmp)|*.jpg; *.jpeg; *.gif; *.bmp
| All Files (*.*)|*.*"
;
if
(dlg.ShowDialog() == true
)
{
txtFileUpload.Text = dlg.SafeFileName;
}
For example : I am able to do this using
FileStream (txtFileUpload.Text, FileMode.Open, FileAccess.Read);
But with IsolatedStorageFileStream, it would display FileNotFoundException.
So I was wondering, is there a way of which I could write IsolatedStorageFileStream much like the FileStream displayed above??
I am learning the C# language and I hope I could learn this as most of the examples that I have seen online have hardcoded the path like "MyFile.txt", which I do not wish for that.
Are there any tutorials or references of which I could refer in regards to IsolatedStorage?
Thank you for your time.
-
September 16th, 2009, 07:22 PM
#2
Re: IsolatedStorageFileStream Enquiry
Off the top of my head...
Are you specifying an absolute path to your file? This would cause the failure.
IsolatedStorage uses it's own 'area' of the file system to store data. All of the path's it uses are relative to that.
Rob
-
Ohhhhh.... Old McDonald was dyslexic, E O I O EEEEEEEEEE.......
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|