Parameters
From Visual WebGui Wiki
| This article missing it's contents and needs writing. Please help contributing to this wiki and add contents. |
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
- Using post prefix for Visual WebGui forms
- Sending and using Query Parameters
- Using Query Parameters
- Posting (hidden) variables to forms like PayPal etc.
- Sample on how to communicate with PayPal service from Visual WebGui
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.
