Switching to Edit Mode on the ViewEdit Page and Saving Changes - Day 4 - Part 11

Sign in to queue

Description

In this video Bob uses previously discussed techniques to switch back and forth between view and edit modes by copying the content from the TextBlock to the TextBox before setting the visibility of each control. Finally, the data changes are applied to the underlying file.

Download the source code in c#

Download the source code in VB.Net

Embed

Download

Download this episode

The Discussion

  • User profile image
    kctan

    Hi bob,

    I noticed that you use two different ways of creating file:

    - appStorage.OpenFile(fileName, FileMode.Create)

    - appStorage.CreateFile(fileName)

    Any significant difference between the two?

  • User profile image
    Clint

    @kctan: The 2nd one only creates a file.   OpenFile with FileMode.OpenOrCreate will either open it if it is there or will create a new file for you.  Just makes your code a lot cleaner.

Add Your 2 Cents