Link
From Visual WebGui Wiki
| This article will have a few sections added to it soon, based on the following article type skeleton: NewControlTemplate |
Contents |
Overview
The Link class provides services for Visual WebGui applications to open link in a new window.
Link can be used to open URLs to other sites, as well as ones from the same virtual directory as you app is running. The URL can be a normal URL, and it can be a gateway reference as well as reference to a form within your application.
In (allmost) all cases, a new window will be opened, but that new window will not be "controllable" by the caller, and will behave just like you opened that URL in a seperate browsers window.There is only one exception to this rule that a new window is opened, and that's when you use the special targetwindowname of "_top", see LinkParameters.
To control how that new window will be behave, you use LinkParameters.
Availability
The Link class is one of the Out of the Box standard controls, which means it is free and available in all Visual WebGui versions.
Relevant members
Methods
| Name | Description |
|---|---|
| New | The constructor for the Link class. There are no overloads for the constructor, so it's purpose is just to create a new instance of the class. More common is to use the Open static method directly. |
| Open |
Static method of the Link class and the most commonly used. Opens an URL, a GatewayReference, or a Form. Use the LinkParameters parameter to control how the new window behaves. |
LinkParameters
A datastructure passed as a parameter to Link.Open, to control the behaviour of the new window to be opened. Most of the properties are self explanatory, and though there are some that deserve special mention. The following properties can be set in LinkParameters:
| Property | Description |
|---|---|
| Location | Location where the new window should be opened. Of type System.Drawing.Point |
| Size | Size of the new window. Of type System.Drawing.Point |
| FullScreen | Should the new window open full screen. |
| Resizable | Should the new window be resizable. |
| ScrollBars | Should the new window show scrollbars. |
| WindowStyle | WindowStyle of the new window (Modal, ModeLess, Normal). Of type Gizmox.WebGui.Forms.LinkWindowStyle |
| ShowLocationBar | Should the LocationBar (the http address) be shown. |
| ShowMenuBar | Should the MenuBar be shown. |
| ShowStatusBar | Should the StatusBar be shown. |
| ShowTitleBar | Should the TitleBar be shown. |
| ShowToolBar | Should the ToolBar be shown. |
| Form | POST parameters for the target page. |
| QueryString | Query parameters for the target page. Query parameters will be appended to your URL. |
| Target |
The name of the new window to be opened. This can be any any name actually, or even empty. There are a few special names that you need to be aware of (see Other References for more info):
|
Samples of use
- Calling Link.Open with and without LinkParameters
- Posting variables to another domain and receiving them in the target domain
Code used for testing browser dependency
The code can be found on this page.
Tips and Tricks
Limitations and workarounds
SDK Version highlights
- Undetermined version - Support for opening new managed actual windows through server-side API
See also
Rererences
Forum discussons
- Using POST parameters for target page
- Download that doesn't start immediately as processing will take place first - notifying the user
Other references
- Reserved target window names (search for the "Reserved TARGET Names" section)
