Storage Scopes CodeSample - Using application scope variable as form instance counter
Categories: State Serialization, Session Serialization
|
Tags: Developers, Visual WebGui Pipeline, 1. Beginner, 2. Intermediate, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
Revision:
1
Posted:
08/Nov/2009
Updated:
23/July/2010
Status:
Publish
Types: Article
|
This article will have a few sections added to it soon, based on the following article type skeleton: CodeSample Overview
This CodeSample, a part of the Storage Scopes series of articles, will show how you can use the fact that Application Scope variables are global to all instances of the application and can be used as a form instance counter for the whole application.
Open the following form in two browsers, or from two workstations, and see the first form get instance number 1 and then counting.
VB.NET Code
Imports Gizmox.WebGui.Forms
Public Class ShowStorateScopes
Inherits Form
Private Sub ShowStorateScopes_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If VWGContext.Current.Application("InstanceCounter") Is Nothing Then
VWGContext.Current.Application("InstanceCounter") = 1
Else
VWGContext.Current.Application("InstanceCounter") += 1
End If
Me.Text = "This is instance number " + VWGContext.Current.Application("InstanceCounter").ToString + " of this form"
End Sub
End Class
C# CodeThe conversion of this code to C# has not been completed yet.
About the author
Related Articles
|
State Serialization
|
|
|
Tags:
Architects, Developers, Visual WebGui Pipeline, 2. Intermediate, 3. Advanced, Optimizing Performance, Pre v6.3, v6.3, v6.4 and Later
|
|
|
Tags:
Architects, Developers, Visual WebGui Pipeline, 2. Intermediate, 3. Advanced, Optimizing Performance, v6.4 and Later
|
|
|
Tags:
Architects, Developers, Visual WebGui Pipeline, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
|
|
|
Tags:
Developers, Visual WebGui Pipeline, 1. Beginner, 2. Intermediate, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
|
|
|
Tags:
Developers, Visual WebGui Pipeline, 1. Beginner, 2. Intermediate, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
|
|
|
Tags:
Developers, Visual WebGui Pipeline, 1. Beginner, 2. Intermediate, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
|
|
|
|