Create file
Can anyone help me to do a task that to create a txt file(ie, data entered in a text box) by a button click in windows store app? Need codes..
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Suresh MPosted Jun 11, 2014, 6:35 AM
first you need to create text file for that use below code
StorageFile file=await StorageFolder.CreateFileAsync("Sample.txt",CreationCollisionOption.ReplaceExisting);
Next Write the below code for writing data to your text file
await FileIO.WriteTextAsync(file,TextBox1.Text);