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

Download this episode

Download Video

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

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    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.

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to send us feedback you can Contact Us.