Form Concepts - MainForm

From Visual WebGui Wiki

Jump to: navigation, search

Contents

Overview

This article is a part of Form Concepts series of articles.

What makes a Form a MainForm

When we talk about that a form is the "MainForm", we usually mean the form that gets started when we start our application in debug mode within Visual Studio. Technically speaking, that is true, but that also means something else. The MainForm is actually the form that currently has "the context" or is the current main application form at any point in time.

There are two ways to make a form our MainForm. One is directing our browser directly to the form, like in http://localhost/Form1.wgx (which makes Form1 our current MainForm). This is what we do when we start our application within Visual Studio. The second method is to perform a Context.Transfer to another form, which makes that new form our current MainForm.

To enable any particular form as one of our application entry points (navigating to it directly via a browser), we need to register that form within web.config. To enable transfering a context to any form, we don't need any registering in web.config.

Except for the above, the MainForm is just a normal Form class.

Registering your MainForm in web.config

Registering a Form in web.config, exposes it to the outside world as one of your application entry points. In Visual WebGui Professional Studio suites, you can register the form in the Visual WebGui Integration tab named Registration, while in other versions of Visual WebGui you must manually edit your web.config to accomplish the task.

See also


References

Articles

Videos

Forum threads

Personal tools