Form Concepts CodeSample - Storing and retrieving new values from dialog forms
From Visual WebGui Wiki
| This article will have a few sections added to it soon, based on the following article type skeleton: NewCodeSampleTemplate |
Contents |
Overview
This article is a part of the Form Concepts series of articles. A
This CodeSample will demonstrate how you can transfer data between your mainform and your dialogform back and forth.
Another, but very similar sample can be found at Storing and retrieving values from dialog forms. The difference between the two samples being that the other sample stores the necessary values in the dialog form, only to retrieve it later, while this sample changes or adds values which are then accessible by the MainForm.
Samples of use
VB.NET Code
'No special code to show here. See demo app for detailsC# Code
// No special code to show here. See demo app for detailsThe demo application
The demo application's MainForm creates an instance of class MyInformation and partly fills it with data, and then assigns it to a property exposed on the DialogForm. DialogForm shows the value partially filled by the MainForm and then depending on users reaction to the DialogForm, that form completes filling in the MyInformation class and then closes. MainForm then retrieves the value added by the DialogForm and displays on screen.
