Search KB Filter article types
Link
Categories: Buttons and LinkLabels
Tags: Architects, Developers, Navigation, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
Revision: 1
Posted: 22/July/2009
Updated: 21/July/2010
Status: Publish
Types: Reference

This article will have a few sections added to it soon, based on the following article type skeleton: Control
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 membersMethods
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:

PropertyDescription
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.
FormPOST parameters for the target page.
QueryStringQuery 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):

  • _blank - Loads the linked document into a new blank window.
  • _popup - Loads the linked document into a pop-up window. This is similar to "_blank" except that pop-up windows are generally borderless and automatically sized to match the document content, disappearing when clicked.
  • _self - Loads the linked document into the same frame as the anchor that was clicked on. This is useful for overriding an inherited target value.
  • _parent - Loads the linked document into the immediate parent frame of the frame containing the clicked anchor. This defaults to acting like "_self" when the clicked anchor isn't contained by a frame (i.e. its directly part of the page).
  • _top - Loads the linked document into the full extent of the window. This acts like "_self" when the clicked anchor isn't contained by a frame (i.e. its directly part of the page). Similar to redirect.
Samples of useCode used for testing browser dependency

The code can be found on this page.

Tips and TricksLimitations and workaroundsSDK Version highlightsSee also
RererencesForum discussonsOther references


About the author

Related Articles

Buttons and LinkLabels  
Title Update Author
This video demonstrates how to open links in Visual WebGui.
Tags: Developers, Navigation, 1. Beginner, Navigation, Pre v6.3, v6.3, v6.4 and Later, 2. Intermediate, 3. Advanced
01/Jan/2009    2009/01/01
This video demonstrates how to open links in Visual WebGui.
Tags: Developers, Navigation, 1. Beginner, Navigation, Pre v6.3, v6.3, v6.4 and Later, 2. Intermediate, 3. Advanced
11/Jan/2007    2007/01/11
Tags: Architects, Developers, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
04/Dec/2010    2010/12/04
Tags: Developers, Navigation, 1. Beginner, 2. Intermediate, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
23/July/2010    2010/07/23
Tags: Architects, Developers, Navigation, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
04/Dec/2010    2010/12/04
Tags: Developers, Navigation, 1. Beginner, 2. Intermediate, 3. Advanced, Navigation, Pre v6.3, v6.3, v6.4 and Later
23/July/2010    2010/07/23
.NET Web, Cloud and Mobile application delivery platform | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2011 Visual WebGui®       Visual WebGui weblog on ASP.NET Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS