Parameters

From Visual WebGui Wiki

Jump to: navigation, search


Contents

Parameters in Visual WebGui applications

Future contents

This article should discuss all aspects of using all kind of "parameters", like Query Parameters and POST parameters (posting to a page), as well as showing examples of their usage.

Special mention must be for the "post" prefix required when using query parameters against a Visual WebGui mainform.

Query Parameters (URL arguments)

VB.NET

' Calling address using 'post' prefix
http://MyApp/MyFolder/post.MyForm.wgx?MyParam1=| class="nu0">123&MyParam2=HelloWorld
 
' Load event of receiving form
dim myparam1 as string = VWGContext.Current.Arguments("MyParam1").ToString() //"123"
dim myparam2 as string = VWGContext.Current.Arguments("MyParam2").ToString() //"HelloWorld"

C#

// Calling address using 'post' prefix
http://MyApp/MyFolder/post.MyForm.wgx?MyParam1=123&MyParam2=HelloWorld
 
// Load event of receiving form
string myparam1 = VWGContext.Current.Arguments["MyParam1"].ToString(); //"123"
string myparam2 = VWGContext.Current.Arguments["MyParam2"].ToString(); //"HelloWorld"

Forum threads

Special notes on using query parameters

The points listed here are retrieved from this tracker entry here.

  • Reaching the query string property is not the recommended way to retrieve URL's argument - the context's arguments is the VWG official way for that matter.
  • VWG supports context's arguments only when the URL has a ".post." prefix.
  • The "vwginstance" is a VWG internal argument and therefore it will never be contained in the context's arguments collection.

POST variables

Samples of use

Forum threads

Tracker entries

Personal tools