LogoLogo
HomeNewsSupportVideos
v2.5
v2.5
  • Welcome
  • What's New
  • Releases
  • Concepts
  • Themes
  • Extensions
  • Wisej.Web
    • General
      • Application
        • Application.FormCollection
        • Application.PageCollection
        • HashChangedEventArgs
        • HashChangedEventHandler
        • LicenseErrorEventArgs
        • LicenseErrorEventHandler
        • ResponsiveProfileChangedEventArgs
        • ResponsiveProfileChangedEventHandler
      • Clipboard
      • Component
      • Control
        • Control.ControlCollection
        • ControlEventArgs
        • ControlEventHandler
        • DragEventArgs
        • DragEventHandler
        • HelpEventArgs
        • HelpEventHandler
        • KeyEventArgs
        • KeyEventHandler
        • KeyPressEventArgs
        • KeyPressEventHandler
        • LayoutEventArgs
        • LayoutEventHandler
        • MouseEventArgs
        • MouseEventHandler
        • PaintEventArgs
        • PaintEventHandler
        • PinchEventArgs
        • PinchEventHandler
        • PreviewKeyDownEventArgs
        • PreviewKeyDownEventHandler
        • QueryContinueDragEventArgs
        • QueryContinueDragEventHandler
        • ResponsiveProfileChangedEventArgs
        • ResponsiveProfileChangedEventHandler
        • RotateEventArgs
        • RotateEventHandler
        • SwipeEventArgs
        • SwipeEventHandler
        • TouchEventArgs
        • TouchEventHandler
        • TrackEventArgs
        • TrackEventHandler
        • WidgetEventArgs
        • WidgetEventHandler
      • Cursor
      • Cursors
      • DataObject
      • Padding
      • Screen
    • Buttons
      • Button
        • MenuButtonItemClickedEventArgs
        • MenuButtonItemClickedEventHandler
      • ButtonBase
      • CheckBox
      • RadioButton
      • SplitButton
    • Common Dialogs
      • ColorDialog
      • CommonDialog
      • FileDialog
      • FileDialogLoadPathEventArgs
      • FileDialogLoadPathEventHandler
      • FileDialogRootCollection
      • FileDialogUI
      • FolderBrowserDialog
      • FolderBrowserDialogUI
      • OpenFileDialog
      • SaveFileDialog
    • Containers
      • Accordion
        • AccordionAction
        • AccordionCancelEventArgs
        • AccordionCancelEventHandler
        • AccordionEventArgs
        • AccordionEventHandler
        • AccordionPanel
      • ContainerControl
        • AcceleratorEventArgs
        • AcceleratorEventHandler
      • DataRepeater
        • DataRepeaterAddRemoveItemsCancelEventArgs
        • DataRepeaterAddRemoveItemsCancelEventHandler
        • DataRepeaterAddRemoveItemsEventArgs
        • DataRepeaterAddRemoveItemsEventHandler
        • DataRepeaterDataErrorEventArgs
        • DataRepeaterDataErrorEventHandler
        • DataRepeaterItem
        • DataRepeaterItemCloneEventHandler
        • DataRepeaterItemEventArgs
        • DataRepeaterItemEventHandler
        • DataRepeaterItemValueEventArgs
        • DataRepeaterItemValueEventHandler
        • DataRepeaterLayoutStyles
      • Desktop
        • DesktopTaskBarItem
        • DesktopTaskBarItemClickEventArgs
        • DesktopTaskBarItemClickEventHandler
        • DesktopTaskBarItemCollection
        • DesktopTaskBarItemControl
        • DesktopTaskBarItemDateTime
      • FlexLayoutPanel
        • FlexLayoutStyle
      • FlowLayoutPanel
        • FlowDirection
      • Form
        • CloseReason
        • FormBorderStyle
        • FormClosedEventArgs
        • FormClosedEventHandler
        • FormClosingEventArgs
        • FormClosingEventHandler
        • FormStartPosition
        • FormWindowState
        • MdiClient
        • MdiTabProperties
      • GroupBox
      • Page
      • Panel
      • ScrollableControl
        • ScrollEventArgs
        • ScrollEventHandler
      • SlideBar
      • SplitContainer
        • FixedPanel
        • SplitterCancelEventArgs
        • SplitterCancelEventHandler
        • SplitterEventArgs
        • SplitterEventHandler
        • SplitterPanel
      • StatusBar
        • StatusBarControl
        • StatusBarPanel
        • StatusBarPanelAutoSize
        • StatusBarPanelBorderStyle
        • StatusBarPanelClickEventArgs
        • StatusBarPanelClickEventHandler
      • TabControl
        • TabAlignment
        • TabControlAction
        • TabControlCancelEventArgs
        • TabControlCancelEventHandler
        • TabControlEventArgs
        • TabControlEventHandler
        • TabPage
        • TabSizeMode
      • TableLayoutPanel
        • ColumnStyle
        • RowStyle
        • TableLayoutColumnStyleCollection
        • TableLayoutPanelGrowStyle
        • TableLayoutRowStyleCollection
        • TableLayoutSettings
        • TableLayoutStyle
        • TableLayoutStyleCollection
      • ToolBar
        • ToolBar.ToolBarButtonCollection
        • ToolBarButton
        • ToolBarButtonClickEventArgs
        • ToolBarButtonClickEventHandler
        • ToolBarButtonSizeMode
        • ToolBarButtonStyle
        • ToolBarTextAlign
      • UserControl
      • UserPopup
    • Content
      • AspNetPanel
      • Canvas
      • HtmlPanel
        • HtmlPanelElementClickArgs
        • HtmlPanelElementClickHandler
      • IFramePanel
      • ImageList
        • ImageList.ImageCollection
      • Label
      • Line
      • LinkLabel
        • LinkArea
        • LinkLabelLinkClickedEventArgs
        • LinkLabelLinkClickedEventHandler
      • PdfViewer
      • PictureBox
      • ProgressBar
      • ScrollBar
        • HScrollBar
        • HScrollProperties
        • ScrollEventArgs
        • ScrollEventHandler
        • ScrollProperties
        • VScrollBar
        • VScrollProperties
      • Shape
      • Spacer
      • Upload
        • CaptureMode
        • UploadedEventArgs
        • UploadedEventHandler
        • UploadErrorEventArgs
        • UploadErrorEventHandler
        • UploadErrorType
        • UploadingEventArgs
        • UploadingEventHandler
        • UploadProgressEventArgs
        • UploadProgressEventHandler
      • WebBrowser
        • WebBrowserDocumentCompletedEventArgs
        • WebBrowserDocumentCompletedEventHandler
      • Widget
        • WebRequestEventArgs
        • WebRequestHandler
    • Data Binding
      • Binding
      • BindingCompleteContext
      • BindingCompleteEventArgs
      • BindingCompleteEventHandler
      • BindingCompleteState
      • BindingContext
      • BindingManagerBase
      • BindingManagerDataErrorEventArgs
      • BindingManagerDataErrorEventHandler
      • BindingMemberInfo
      • BindingNavigator
      • BindingsCollection
      • BindingSource
      • ControlBindingsCollection
      • ControlUpdateMode
      • ConvertEventArgs
      • ConvertEventHandler
      • CurrencyManager
      • DataSourceUpdateMode
      • IBindableComponent
      • ICurrencyManagerProvider
      • ItemChangedEventArgs
      • ItemChangedEventHandler
      • ListBindingConverter
      • ListBindingHelper
      • PropertyManager
    • Editors
      • CharacterCasing
      • ComponentTool
      • ComponentToolCollection
      • DateTimePicker
      • DomainUpDown
      • InputType
      • LabelWrapper
      • MaskedTextBox
      • MonthCalendar
        • DateRangeEventArgs
        • DateRangeEventHandler
        • SelectionRange
      • NumericUpDown
      • TagTextBox
        • TagTextBoxEventArgs
        • TagTextBoxEventHandler
        • TagTextBoxMousEventArgs
        • TagTextBoxMousEventHandler
        • TagTextBoxRenderEventArgs
        • TagTextBoxRenderEventHandler
      • TextBox
      • TextBoxBase
      • TextBoxMode
      • TextBoxType
      • TimeUpDown
        • TimeUpDownFormat
      • TrackBar
      • UpDownBase
    • Enumerations
      • AccessibleRole
      • AnchorStyles
      • Appearance
      • AutoComplete
      • AutoCompleteMode
      • AutoScaleMode
      • AutoSizeMode
      • AutoValidate
      • BorderStyle
      • BoundsSpecified
      • CheckState
      • ColorDepth
      • ComboBoxStyle
      • ControlStyles
      • DataFormats
      • DataFormats.Format
      • DateTimePickerFormat
      • Day
      • DialogResult
      • Display
      • DockStyle
      • DragAction
      • DragDropEffects
      • GetChildAtPointSkip
      • HeaderPosition
      • HorizontalAlignment
      • ImageLayout
      • ImagePosition
      • ImeMode
      • Keys
      • LabelPosition
      • LeftRightAlignment
      • LineStyle
      • LinkBehavior
      • MaskFormat
      • MouseButtons
      • ObjectFit
      • Orientation
      • PanelAutoShowMode
      • PictureBoxSizeMode
      • Placement
      • PlacementMode
      • Position
      • RightToLeft
      • ScrollBars
      • ScrollEventType
      • ScrollOrientation
      • SelectionMode
      • Shortcut
      • SizeType
      • SortOrder
      • TabOrderManagerDirection
      • TextDataFormat
      • TextImageRelation
      • TickStyle
      • ValidationConstraints
      • VerticalAlignment
    • Extenders
      • Animation
        • AnimationEventArgs
        • AnimationEventHandler
      • ErrorAnimationType
      • ErrorBlinkStyle
      • ErrorIconAlignment
      • ErrorProvider
      • HelpTip
      • JavaScript
      • Rotation
      • StyleSheet
      • TabOrderManager
      • ToolTip
      • ToolTipIcon
    • Interfaces
      • IButtonControl
      • IContainerControl
      • IDataObject
    • Lists & Grids
      • CheckedListBox
        • ItemCheckEventArgs
        • ItemCheckEventHandler
      • ComboBox
      • DataGridView
        • BaseCollection
        • DataGridView.HitTestInfo
        • DataGridView.HitTestType
        • DataGridViewAutoSizeColumnMode
        • DataGridViewAutoSizeColumnsMode
        • DataGridViewAutoSizeRowMode
        • DataGridViewAutoSizeRowsMode
        • DataGridViewBand
        • DataGridViewBindingCompleteEventArgs
        • DataGridViewBindingCompleteEventHandler
        • DataGridViewButtonCell
        • DataGridViewButtonColumn
        • DataGridViewCell
        • DataGridViewCellBorderStyle
        • DataGridViewCellCancelEventArgs
        • DataGridViewCellCancelEventHandler
        • DataGridViewCellCollection
        • DataGridViewCellContextMenuNeededEventArgs
        • DataGridViewCellContextMenuNeededEventHandler
        • DataGridViewCellErrorTextNeededEventArgs
        • DataGridViewCellErrorTextNeededEventHandler
        • DataGridViewCellEventArgs
        • DataGridViewCellEventHandler
        • DataGridViewCellFormattingEventArgs
        • DataGridViewCellFormattingEventHandler
        • DataGridViewCellMouseEventArgs
        • DataGridViewCellMouseEventHandler
        • DataGridViewCellPaintEventArgs
        • DataGridViewCellPaintEventHandler
        • DataGridViewCellParsingEventArgs
        • DataGridViewCellParsingEventHandler
        • DataGridViewCellStateChangedEventArgs
        • DataGridViewCellStateChangedEventHandler
        • DataGridViewCellStyle
        • DataGridViewCellStyleContentChangedEventArgs
        • DataGridViewCellStyleContentChangedEventHandler
        • DataGridViewCellStyleScopes
        • DataGridViewCellToolTipTextNeededEventArgs
        • DataGridViewCellToolTipTextNeededEventHandler
        • DataGridViewCellValidatingEventArgs
        • DataGridViewCellValidatingEventHandler
        • DataGridViewCellValueEventArgs
        • DataGridViewCellValueEventHandler
        • DataGridViewCheckBoxCell
        • DataGridViewCheckBoxColumn
        • DataGridViewChildRowCollection
        • DataGridViewClipboardCopyMode
        • DataGridViewCollectionChangeEventArgs
        • DataGridViewColumn
        • DataGridViewColumnCollection
        • DataGridViewColumnEventArgs
        • DataGridViewColumnEventHandler
        • DataGridViewColumnHeaderCell
        • DataGridViewColumnHeadersHeightSizeMode
        • DataGridViewColumnSortMode
        • DataGridViewColumnsSortMode
        • DataGridViewColumnStateChangedEventArgs
        • DataGridViewColumnStateChangedEventHandler
        • DataGridViewComboBoxCell
        • DataGridViewComboBoxColumn
        • DataGridViewComboBoxEditingControl
        • DataGridViewContentAlignment
        • DataGridViewDataErrorEventArgs
        • DataGridViewDataErrorEventHandler
        • DataGridViewDataReadEventHandler
        • DataGridViewDataUpdatedEventArgs
        • DataGridViewDataUpdatedEventHandler
        • DataGridViewDateTimePickerCell
        • DataGridViewDateTimePickerColumn
        • DataGridViewDateTimePickerEditingControl
        • DataGridViewEditingControlShowingEventArgs
        • DataGridViewEditingControlShowingEventHandler
        • DataGridViewEditMode
        • DataGridViewElement
        • DataGridViewElementStates
        • DataGridViewHeaderCell
        • DataGridViewImageCell
        • DataGridViewImageCellLayout
        • DataGridViewImageColumn
        • DataGridViewLinkCell
        • DataGridViewLinkColumn
        • DataGridViewMaskedTextBoxCell
        • DataGridViewMaskedTextBoxColumn
        • DataGridViewMaskedTextBoxEditingControl
        • DataGridViewNumericUpDownCell
        • DataGridViewNumericUpDownColumn
        • DataGridViewNumericUpDownEditingControl
        • DataGridViewRow
        • DataGridViewRowCancelEventArgs
        • DataGridViewRowCancelEventHandler
        • DataGridViewRowCollection
        • DataGridViewRowErrorTextNeededEventArgs
        • DataGridViewRowErrorTextNeededEventHandler
        • DataGridViewRowEventArgs
        • DataGridViewRowEventHandler
        • DataGridViewRowHeaderCell
        • DataGridViewRowHeadersWidthSizeMode
        • DataGridViewRowHeightInfoNeededEventArgs
        • DataGridViewRowHeightInfoNeededEventHandler
        • DataGridViewRowsAddedEventArgs
        • DataGridViewRowsAddedEventHandler
        • DataGridViewRowsRemovedEventArgs
        • DataGridViewRowsRemovedEventHandler
        • DataGridViewRowStateChangedEventArgs
        • DataGridViewRowStateChangedEventHandler
        • DataGridViewSelectedCellCollection
        • DataGridViewSelectedColumnCollection
        • DataGridViewSelectedRowCollection
        • DataGridViewSelectionMode
        • DataGridViewSortCompareEventArgs
        • DataGridViewSortCompareEventHandler
        • DataGridViewSortSelectionMode
        • DataGridViewTextBoxCell
        • DataGridViewTextBoxColumn
        • DataGridViewTextBoxEditingControl
        • DataGridViewToolClickEventHandler
        • DataGridViewTriState
        • IDataGridViewEditingControl
        • InputType
        • ScrollEventArgs
        • ScrollEventHandler
        • TextBoxMode
        • TextBoxType
      • ListBox
      • ListControl
        • ListControlConvertEventArgs
        • ListControlConvertEventHandler
      • ListView
        • CacheVirtualItemsEventArgs
        • CacheVirtualItemsEventHandler
        • ColumnClickEventArgs
        • ColumnClickEventHandler
        • ColumnHeader
        • ColumnHeaderAutoResizeStyle
        • ColumnHeaderStyle
        • ColumnReorderedEventArgs
        • ColumnReorderedEventHandler
        • ColumnWidthChangedEventArgs
        • ColumnWidthChangedEventHandler
        • GridLineStyle
        • ImageColumnHeader
        • ItemCheckedEventArgs
        • ItemCheckedEventHandler
        • ItemClickEventArgs
        • ItemClickEventHandler
        • ItemMouseHoverEventArgs
        • ItemMouseHoverEventHandler
        • ItemSelectionChangedEventArgs
        • ItemSelectionChangedEventHandler
        • LabelEditEventArgs
        • LabelEditEventHandler
        • ListView.CheckedIndexCollection
        • ListView.CheckedListViewItemCollection
        • ListView.ColumnHeaderCollection
        • ListView.ListViewItemCollection
        • ListView.SelectedIndexCollection
        • ListView.SelectedListViewItemCollection
        • ListViewBindingCompleteEventArgs
        • ListViewBindingCompleteEventEventHandler
        • ListViewDataUpdatedEventArgs
        • ListViewDataUpdatedEventHandler
        • ListViewItem
        • ListViewItem.ListViewSubItem
        • ListViewItem.ListViewSubItemCollection
        • ListViewItemDragEventArgs
        • ListViewItemDragEventHandler
        • ListViewItemStates
        • ListViewVirtualItemsSelectionRangeChangedEventArgs
        • ListViewVirtualItemsSelectionRangeChangedEventHandler
        • RetrieveVirtualItemEventArgs
        • RetrieveVirtualItemEventHandler
        • SearchForVirtualItemEventArgs
        • SearchForVirtualItemEventHandler
        • View
      • ListViewComboBox
      • PropertyGrid
        • GridItem
        • GridItemCollection
        • GridItemType
        • PropertySort
        • PropertyValueChangedEventArgs
        • PropertyValueChangedEventHandler
        • PropertyValueDataErrorEventArgs
        • PropertyValueDataErrorEventHandler
        • PropertyValueFormattingEventArgs
        • PropertyValueFormattingEventHandler
        • SelectedGridItemBeginEditEventArgs
        • SelectedGridItemBeginEditEventHandler
        • SelectedGridItemChangedEventArgs
        • SelectedGridItemChangedEventHandler
        • SelectedGridItemEndEditEventArgs
        • SelectedGridItemEndEditEventHandler
      • TreeView
        • ItemDragEventArgs
        • ItemDragEventHandler
        • NodeLabelEditEventArgs
        • NodeLabelEditEventHandler
        • TreeNode
        • TreeNodeCollection
        • TreeNodeMouseClickEventArgs
        • TreeNodeMouseClickEventHandler
        • TreeNodeMouseHoverEventArgs
        • TreeNodeMouseHoverEventHandler
        • TreeViewAction
        • TreeViewCancelEventArgs
        • TreeViewCancelEventHandler
        • TreeViewEventArgs
        • TreeViewEventHandler
        • TreeViewNodeDragEventArgs
        • TreeViewNodeDragEventHandler
      • TreeViewComboBox
      • UserComboBox
    • Media
      • Audio
      • FlashPlayer
      • Media
      • Video
    • Menus
      • CheckedMenuItem
      • ContextMenu
      • LinkMenuItem
      • MainMenu
      • Menu
      • Menu.MenuItemCollection
      • MenuBar
      • MenuItem
      • MenuItemEventArgs
      • MenuItemEventHandler
      • MenuItemSizeMode
      • MenuMerge
    • Notifications
      • AlertBox
        • MessageBoxIcon
      • MessageBox
        • MessageBoxButtons
        • MessageBoxDefaultButton
        • MessageBoxIcon
      • Toast
    • Other Components
      • Timer
  • Wisej.Base
    • General
      • Component
      • Cookie
      • CookieCollection
      • PostbackPropertyAttribute
      • TextUtils
    • Responsive
      • ResponsiveProfile
      • ResponsiveProfileCollection
      • ResponsivePropertyAttribute
  • Wisej.Core
    • General
      • BrowserStorage
      • ClientBrowser
      • ClientProfile
      • ClientTheme
      • CookieStorage
      • FileSystemProvider
      • HealthCheck
      • IEventFilter
      • IFileSystemProvider
      • LocalStorage
      • MimeTypes
      • SessionStorage
      • SynchronizedLinkedList<T>
      • SynchronizedList<T>
      • WebMethodAttribute
      • WisejEventArgs
        • WisejEventArgs.KeyboardInfo
        • WisejEventArgs.PointerInfo
      • WisejResourcesAttribute
      • WisejSerializer
      • WisejSerializerOptions
    • Interfaces
      • IWisejComponent
      • IWisejControl
      • IWisejDataStore
      • IWisejEditorService
      • IWisejExtenderProvider
      • IWisejHandler
      • IWisejSerializable
      • IWisejWindow
  • Wisej.Web.VisualBasic
    • Extensions
      • Interaction
      • MsgBoxResult
      • MsgBoxStyle
  • System
    • Extensions
      • DateTimeExtensions
      • FontExtensions
      • JSON
      • StringExtensions
Powered by GitBook
On this page
  • Properties
  • ActiveProfile
  • Browser
  • ClientFingerprint
  • ClientId
  • Clients
  • CommonAppDataPath
  • CommonAppDataRegistry
  • CompanyName
  • Configuration
  • Cookies
  • Current
  • CurrentCulture
  • Desktop
  • EnableUnloadConfirmation
  • ExecutablePath
  • FavIcon
  • FavIconSource
  • Hash
  • IsAuthenticated
  • IsDisposed
  • IsExpired
  • IsSecure
  • IsTerminated
  • IsWebSocket
  • LicenseKey
  • MainPage
  • OpenForms
  • OpenPages
  • Platform
  • ProductName
  • ProductVersion
  • QueryString
  • RightToLeft
  • RuntimeMode
  • ServerName
  • ServerPort
  • ServerVariables
  • Session
  • SessionCount
  • SessionId
  • ShowConsole
  • ShowLoader
  • StartupPath
  • StartupUri
  • StartupUrl
  • Theme
  • Title
  • Uri
  • Url
  • User
  • UserAgent
  • UserHostAddress
  • UserHostName
  • UserIdentity
  • UserLanguages
  • Methods
  • AddEventFilter(filter)
  • AddTranslation(text, translation)
  • AlertAsync(message)
  • Call(function, args)
  • Call(function, callback, args)
  • CallAsync(function, args)
  • CancelFullScreen()
  • ConfirmAsync(message)
  • Download(filePath, fileName)
  • Download(image, fileName)
  • Download(stream, fileName)
  • DownloadAndOpen(target, filePath, fileName)
  • DownloadAndOpen(target, image, fileName)
  • DownloadAndOpen(target, stream, fileName)
  • EndPolling()
  • Eval(script)
  • Eval(script, callback)
  • EvalAsync(script)
  • Exit()
  • FindComponent(match)
  • FindComponents(match)
  • LoadAssembly(filePath)
  • LoadComponent(filePath, className)
  • LoadPackages(packages, callback)
  • LoadPackagesAsync(packages)
  • LoadTheme(name, mixins)
  • MapPath(path)
  • Navigate(url, target)
  • Play(type)
  • Play(soundUrl)
  • Post(callback)
  • Print(window)
  • Print()
  • PromptAsync(message, defaultValue)
  • Reload()
  • RemoveEventFilter(filter)
  • RequestFullScreen()
  • RunInContext(context, action)
  • SetSessionTimeout(seconds)
  • StartPolling(interval)
  • StartTask(action)
  • StartTask<T>(action)
  • StartTimer(dueTime, period, callback)
  • Update(context, action)
  • Events
  • ActiveWindowChanged
  • ApplicationExit
  • ApplicationRefresh
  • ApplicationStart
  • BeforeInstallPrompt
  • BeginRequest
  • BrowserSizeChanged
  • BrowserTabActivated
  • BrowserTabDeactivated
  • CultureChanged
  • EndRequest
  • FocusedControlChanged
  • HashChanged
  • Idle
  • LicenseError
  • ResponsiveProfileChanged
  • RightToLeftChanged
  • SessionTimeout
  • ThemeChanged
  • ThreadException
  • Implements

Was this helpful?

Export as PDF
  1. Wisej.Web
  2. General

Application

Wisej.Web.Application

Last updated 2 years ago

Was this helpful?

Namespace: Wisej.Web

Assembly: Wisej.Framework (2.5.0.0)

Represent a Wisej application session. Provides methods and events to manage the application in the context of the current session.

public class Application : IWisejComponent, IDisposable, IWisejSynchronized
Public Class Application
    Inherits IWisejComponent
    Implements IDisposable, IWisejSynchronized

This class provides several static methods, properties and events that allow the application to manage all sorts of features related to the current session:

  • Save and retrieve session variable. Use to store and retrieve session variable. The property is a dynamic object and a , therefore you can access its properties directly or through the indexer.

    Application.Session.myValue = 12;
    Application.Session["myValue"] = 12;
  
  • Manage cookies. Use to manage browser's cookies.

  • Read server variables. Use to retrieve all the data made available by the server. Some of the variables in the collection are also available directly: , , , etc.

  • Read the application's URL. Use , , , and .

  • Read the applications's system information. Use , , , etc.

  • Listen to the application's global events. See , , , , , , and many more.

  • Retrieve browser related information. Use the to read the client browser type, OS, version, capabilities, screen size, browser size, language, and state. The object is updated automatically when the user resizes the browser or the page is reloaded.

  • Control the client browser. Start a , execute JavaScript functions or scriptlets using or . Make the browser navigate to a different URL using or simply the page.

  • Manage the main page or current desktop. lets you change the object that fills the browser and "navigate" from page to page. lets you change the active object on the client browser.

  • Manage all live components in the session. Through the class you can find, iterate, inspect all live components of any type. See for all the currently created (visible or invisible) instances of . returns all the created objects. and provide an easy way to find any component in the session or to iterate the list of components that match a custom expression.

  • Start background tasks in context. provides a powerful way to start a background task on the server that can keep interacting with the client browser while running independently.

  • Manage the application's theme. Use to load a Wisej theme into the application. Or use the object to read all sorts of information from the current .

  • Terminate the application without waiting for the session to timeout. Use to terminate the current session and free all the related memory.

Properties

This is the profile that best matches the current browser on the client. It is updated automatically on every request.

The client fingerprint is generated by hashing all the available information returned by the browser (OS, user agent, version, etc.) and it's not guaranteed to be unique.

var current = Application.Current;
var thread = new Thread(() => {
  Application.Update(current, () => {
  
    // code here is running in context.
    
  });
});

This property attaches the window.onbeforeunload event. See https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeunload. It's not possible to determine whether the page is being unloaded because the user is trying to close the tab, close the browser, or is refreshing the page, or is taking any other action that may reload the page.

static class Program
{
  static Program()
  {
    Application.LicenseKey = "...";
  }
}

The value of this property is updated automatically when the current language changes if the value of "rightToLeft" in the application configuration file is set to "auto".

Displays a simple HTMl only debug console. Works with any browser also when the developer tools are not available.

// create a new custom theme cloned from the current theme.
var myTheme = new ClientTheme("MyTheme", Application.Theme);

// alter the buttonFace color.
myTheme.Colors.buttonFace = "red";

// update the current session using the new custom theme.
Application.Theme = myTheme;

You may also alter a global theme shared by all sessions.


// change the buttonFace color in the current theme.
// if the theme is one of the global themes, i.e. it was loaded
// using Application.LoadTheme(name), then the change is also global.
Application.Theme.Colors.buttonFace = "red";

// since the theme objects are all dynamic and use a special DynamicObject
// class part of the Wisej Framework, you can also use a string indexer
// to address any field.
Application.Theme.Colors["buttonFace"] = "red";

Methods

Adds an event filter to monitor all the incoming events before they are routed to their respective component.

Parameter
Type
Description

filter

Adds the text and corresponding translation to the default locale on the client.

Parameter
Type
Description

text

The text to translate.

translation

The translation override.

Instructs the browser to display a dialog with an optional message, and to wait until the user dismisses the dialog.

Parameter
Type
Description

message

A string you want to display in the alert dialog.

Executes the JavaScript function on the client.

Parameter
Type
Description

function

The name of the function to execute.

args

The arguments to pass to the function.

Executes the JavaScript function on the client and receives the return value (or null) in the callback method.

Parameter
Type
Description

function

The name of the function to execute.

callback

Asynchronous callback method that receives the return value.

args

The arguments to pass to the function.

Parameter
Type
Description

function

The name of the function to execute.

args

The arguments to pass to the function.

Cancels the fullscreen mode.

Instructs the browser to display a dialog with an optional message, and to wait until the user either confirms or cancels the dialog. until the user dismisses the dialog.

Parameter
Type
Description

message

A string you want to display in the confirm dialog.

Downloads the specified file on the client.

Parameter
Type
Description

filePath

The file to download.

fileName

The name of the file to save on the client.

Downloads the specified image to the client.

Parameter
Type
Description

image

The image to download.

fileName

The name of the file to save on the client.

Downloads the bytes in the stream to the client.

Parameter
Type
Description

stream

The stream to send to the client.

fileName

The file name the client will use to save the stream.

Downloads the specified file on the client.

Parameter
Type
Description

target

Specifies where to open the file. Leave empty or use "_self" to open in the current tab, _blank to open in a new tab.

filePath

The file to download.

fileName

The name of the file to save on the client.

Downloads the specified image to the client.

Parameter
Type
Description

target

Specifies where to open the file. Leave empty or use "_self" to open in the current tab, _blank to open in a new tab.

image

The image to download.

fileName

The name of the file to save on the client.

Downloads the bytes in the stream to the client.

Parameter
Type
Description

target

Specifies where to open the file. Leave empty or use "_self" to open in the current tab, _blank to open in a new tab.

stream

The stream to send to the client.

fileName

The file name the client will use to save the stream.

Stops the polling requests from the client.

Executes the JavaScript script on the client.

Parameter
Type
Description

script

The script to evaluate.

Executes the JavaScript script on the client and receives the return value (or null) in the callback method.

Parameter
Type
Description

script

The script to evaluate.

callback

Asynchronous callback method that receives the return value.

Parameter
Type
Description

script

The script to evaluate.

Terminates the application and the corresponding session.

Find the first component that matches the conditions defined in the predicate function.

Parameter
Type
Description

match

This method lets an application find any live component in the current session.

  // Find the first component that is a Button with Text = "OK"
  var button = Application.FindComponent(c => c is Button && ((Button)c).Text == "OK");

Finds all the components that match the conditions in the predicate function.

Parameter
Type
Description

match

This method lets an application iterate through all the live components in the current session.

  // List all text boxes that are read only in all forms.
  var list = Application.FindComponents(c => c is TextBox && ((TextBox)c).ReadOnly);

Loads an assembly given the file name or path.

Parameter
Type
Description

filePath

The file name or full path for the assembly to load.

This method loads the assembly and, if the assembly contains Wisej components that need embedded resources - like JavaScript classes or CSS styles - that are embedded in the assembly, notifies the client with the URL to load the additional resources dynamically.

Creates an instance of the specified component from the assembly.

Parameter
Type
Description

filePath

The file name or full path for the assembly to load.

className

Parameter
Type
Description

packages

callback

Parameter
Type
Description

packages

Changes the current theme.

Parameter
Type
Description

name

Name of the theme resource. Use only the name without the path and without the extension.

mixins

Optional list of theme mixins. If null, the default theme mixins are always applied.

Returns the full file path in relation to the application's project directory.

Parameter
Type
Description

path

Navigate to the specified URL.

Parameter
Type
Description

url

URL to navigate to.

target

The target browser window: _self, _blank, etc.

Plays one of the built-in sounds

Parameter
Type
Description

type

Plays a sound.

Parameter
Type
Description

soundUrl

A string representing either a sound file URL or a base64 data URL.

Executes the callback method after all processing is completed and before updating the client.

Parameter
Type
Description

callback

Method to invoke after the request has completed but before sending the response to the server.

The Post() method is similar to the BeginInvoke() method used by desktop applications. It allows you to execute a block of code out of sync with the current execution flow.


void Test() {

  Application.Post(() => {
    this.listBox.Items.Add("1");
  });
  
  this.listBox.Items.Add("2");
  
  // The items will be added in this order: "2", "1".
}

Prints the specified window.

Parameter
Type
Description

window

The window to print

The window is printed without the caption or the borders, if present.

Prints the entire browser window.

Instructs the browser to display a dialog with an optional message prompting the user to input some text, and to wait until the user either submits the text or cancels the dialog.

Parameter
Type
Description

message

A string of text to display to the user.

defaultValue

An optoional string containing the default value displayed in the text input field.

Causes the application to reload on the browser.

Removes the filter from the list of registered event filters.

Parameter
Type
Description

filter

Requests the browser to enable fullscreen mode if supported.

Executes the callback in context.

Parameter
Type
Description

context

action

Function to execute in context. The code in the function can access all the static Application properties when executed from an out-of-bound thread.

Sets the current session timeout in seconds.

Parameter
Type
Description

seconds

Instructs the client to start polling the server for UI changes at the specified interval when a WebSocket connection is not available.

Parameter
Type
Description

interval

Polling interval in milliseconds. The minimum is 1000ms.


// this has not effect when the client and server are connected using WebSocket.
Application.StartPolling(1000);

Application.StartTask(() => {

  for (int i = 0; i < 100; i++) {
    this.label1.Text = "Counting..." + i;
    Thread.Sleep(1000);
  }
  
  // this has not effect when the client and server are NOT connected using WebSocket.
  Application.Update(this);

  // this has not effect when the client and server are connected using WebSocket.
  Application.EndPolling();

});

Throws:

Parameter
Type
Description

action

Start method invoked by the new task when it starts up.

Application.StartTask(() => {

  for (int i = 0; i < 100; i++) {
  
    this.label1.Text = "Counting..." + i;
    
    // just wait a bit or it's too fast.
    Thread.Sleep(1000);
    Application.Update(this);
  }
});
Parameter
Type
Description

T

action

Start method invoked by the new task when it starts up.

string text = await Application.StartTask(() => {

  string value = "";
  for (int i = 0; i < 100; i++) {
  
    value += i.ToString();
    
    // just wait a bit or it's too fast.
    Thread.Sleep(100);
  }
  return value;
});

this.label.Text = text;
Application.Update(this);

Note that you don't have to specify the type in the angular brackets, the compiler will automatically detect the type from the return value of the asynchronous function.

Parameter
Type
Description

dueTime

The amount of time, in milliseconds, to delay before invoking the callback .

period

The time interval between invocations, in milliseconds.

callback

A callback method to invoke at the specified intervals.

Executes the optional callback in context and pushes all the pending updates to the client when in WebSocket mode.

Parameter
Type
Description

context

action

Function to execute in context. The code in the function can access all the static Application properties when executed from an out-of-bound thread.

Use this method when you need to update the client asynchronously from an out-of-bound thread (different thread, not originating from a client request). You can call this method at the end of the code that updates the UI:

Application.StartTask(() => {

    for (int i = 0; i < 100; i++) {
    
      this.label1.Text = "Counting..." + i;
      
      // just wait a bit or it's too fast.
      Thread.Sleep(1000);
    }
    
    Application.Update(this);

});

Or you can use the optional action function to enclose the code that updates the UI in a block and ensure that the client is updated when the code block exits:

Application.StartTask(() => {

    Application.Update(this, () => {
    
      for (int i = 0; i < 100; i++) {
    
        this.label1.Text = "Counting..." + i;
      
        // just wait a bit or it's too fast.
        Thread.Sleep(1000);
      }
    });

});

Events

The default behavior built-in Wisej is to display a dialog asking the user to prolong the session. Set Handled to true to stop the default behavior.

Implements

Name
Description

All wisej components implement this interface.

There is a lot more exposed by the class. You can inspect all the properties and methods in Visual Studio through IntelliSense or online at .

ActiveProfile

: Returns or sets the current client responsive profile.

Browser

: Returns or sets the client browser information.

ClientFingerprint

Deprecated: Deprecated, please use Application.ClientId instead. : Returns the unique client "fingerprint" ID. It can be used to distinguish client devices.

ClientId

: Returns the current unique client id.

Clients

: Returns a collection of all the unique client browsers using the application.

CommonAppDataPath

: Returns the path for the application data that is shared among all users.

CommonAppDataRegistry

: Returns the registry key for the application data that is shared among all users.

CompanyName

: Returns the company name associated with the application stored in the .

Configuration

: Returns the current .

Cookies

: Collection of cookies.

Current

: Returns the application component instance that an application can store and use later to restore the context when updating client widgets during an out-of-bound call using

Threads that are not started using don't have any knowledge of the current session and don't have a way to communicate with the client The property returns the instance of the class that is bound to the current session. It can be used just like any other component with or to restore the session for the current thread. The advantage of using instead of the instance of a control or a page is to avoid to keep a reference to a component that may be disposed by the application.

CurrentCulture

: Returns or sets the current for the session.

Desktop

: Returns or sets the current Desktop.

EnableUnloadConfirmation

: Returns or sets whether the browser will ask the user to confirm unloading the current page.

ExecutablePath

: Returns the path for the application's main assembly.

FavIcon

: Returns or sets the favicon to display in the browser.

FavIconSource

: Returns or sets the URL to the favicon to display in the browser.

Hash

: Returns or sets the hash part of the URL on the client.

IsAuthenticated

: Returns a value indicating whether the session has been authenticated.

IsDisposed

: Indicates that the current application instance, which corresponds to the session, has been terminated and disposed.

IsExpired

: Returns true when the current session has expired.

IsSecure

: Returns true if this session is running in secure mode (https:// and wss://)

IsTerminated

: Returns true when the current session has been terminated.

IsWebSocket

: Returns true if the current session is connected using WebSocket.

LicenseKey

: Returns or sets the runtime server license key.

Setting the programmatically has to be done before the application is loaded. The best place is the static constructor for the Program static class, or the static constructor of the main window (if defined in Default.js).

MainPage

: Returns or sets the current full page window.

OpenForms

: Returns a collection of open forms owned by the application.

OpenPages

: Returns a collection of open pages owned by the application.

Platform

: The name of the currently loaded platform.

ProductName

: Returns the product name associated with this application.

ProductVersion

: Returns the product version associated with this application stored either in or .

QueryString

: Returns the parameters used to launch the application.

RightToLeft

: Returns or sets whether all the controls in the applications should operate using the right-to-left mode.

RuntimeMode

: Returns true when the application is running in not in design, debug or test mode.

ServerName

: Returns the server's host name, DNS alias, or IP address as it would appear in self-referencing URLs.

ServerPort

: Returns the port number to which the request was sent.

ServerVariables

: Returns the server variables.

Session

: Provides a generic storage for session-based objects.

SessionCount

: Returns the total number of currently active sessions.

SessionId

: Returns the unique current session ID.

ShowConsole

: Shows or hides the debug console on the browser.

ShowLoader

: Returns or sets whether the browser is blocked by the Ajax loader.

StartupPath

: Returns the root path of the web application.

StartupUri

: Returns the URI used to start the application.

StartupUrl

: Returns the URL used to start the application.

Theme

: Returns or sets the current .

You can create and modify a new custom theme using the class. The new theme can be based on an existing theme, can be empty, or can be initialized from a JSON string.

Title

: Returns or sets the page title in the browser.

Uri

: Returns the current used either to launch or reload the application. It may be different from .

Url

: Returns the current URL used either to launch or reload the application. It may be different from .

User

: Returns the security information for the current request.

UserAgent

: Returns the raw user agent string of the client browser.

UserHostAddress

: Returns the IP host address of the remote client.

UserHostName

: Returns the DNS name of the remote client.

UserIdentity

: Returns the type for the current user.

UserLanguages

: Gets a sorted string array of client language preferences.

AddEventFilter(filter)

An object that implements the interface to add to the filter list.

AddTranslation(text, translation)

AlertAsync(message)

Returns: . An awaitable that represents the asynchronous operation.

Call(function, args)

Call(function, callback, args)

CallAsync(function, args)

Asynchronously executes the JavaScript function on the client and returns an awaitable with the result of the remote call.

Returns: . An awaitable that represents the asynchronous operation.

CancelFullScreen()

ConfirmAsync(message)

Returns: . An awaitable that represents the asynchronous operation.

Download(filePath, fileName)

Download(image, fileName)

Download(stream, fileName)

DownloadAndOpen(target, filePath, fileName)

DownloadAndOpen(target, image, fileName)

DownloadAndOpen(target, stream, fileName)

EndPolling()

Eval(script)

Eval(script, callback)

EvalAsync(script)

Asynchronously executes the JavaScript script on the client and returns an awaitable with the result of the remote call.

Returns: . An awaitable that represents the asynchronous operation.

Exit()

FindComponent(match)

A custom expression used to match the to find.

Returns: . The first qualified by the match expression.

FindComponents(match)

A custom expression used to match the list of objects to find.

Returns: . The list of instances qualified by the match expression.

LoadAssembly(filePath)

Returns: . The loaded .

LoadComponent(filePath, className)

Returns: . An instance of a Wisej component implementing the interface.

LoadPackages(packages, callback)

LoadPackagesAsync(packages)

Returns: .

LoadTheme(name, mixins)

MapPath(path)

Returns: . The full path relative to the current application's root directory.

Navigate(url, target)

Play(type)

One of value that identifies the sound to play.

Play(soundUrl)

Post(callback)

Print(window)

Print()

PromptAsync(message, defaultValue)

Returns: . An awaitable that represents the asynchronous operation.

Reload()

RemoveEventFilter(filter)

An object that implements the interface to remove from the filter list.

RequestFullScreen()

RunInContext(context, action)

The application context to update. It can be any Wisej component or the returned by the property .

SetSessionTimeout(seconds)

StartPolling(interval)

Calling this method when is true has no effect. Use client side polling when you know that your code will start a background task that needs to update the client asynchronously (push updates) and your server or clients don't support WebSocket connections. Once the background tasks are completed call to reduce the incoming requests from the client.

The interval specified is less than 1.

StartTask(action)

Starts a new task within the current application context and returns immediately. See also .

Returns: . An awaitable .

The task runs in the background but it's still capable of updating the client asynchronously when working with WebSocket by calling the method to push the UI updates to the client browser. If you want to support background updates for clients or servers that can't use the WebSocket connection, you can either add a component to the parent container to force period requests to the server, or you can use the and methods.

StartTask<T>(action)

Starts a new task with a return value within the current application context and returns immediately. See also .

Returns: .

The task runs in the background but it's still capable of updating the client asynchronously when working with WebSocket by calling the method to push the UI updates to the client browser. The generics overload of allows the task to return a value. You can use this with the async/await pattern and asynchronously wait for the task to complete. If you want to support background updates for clients or servers that can't use the WebSocket connection, you can either add a component to the parent container to force period requests to the server, or you can use the and methods.

StartTimer(dueTime, period, callback)

Starts a bound to the current session context.

Returns: . An instance of .

You must save a reference to the returned or the Garbage Collector will stop and dispose the timer. To alter the invocation period user Timer.Changer(), or stop the timer simply use Timer.Dispose(). See .

Update(context, action)

The application context to update. It can be any Wisej component or the returned by the property .

ActiveWindowChanged

Fired when the active window changes.

ApplicationExit

Fired when the application is about to shut down.

ApplicationRefresh

Fired when the application is reloaded in the browser because the user hit refresh or changed the URL.

ApplicationStart

Fired when the application is started, after the Main method is called.

BeforeInstallPrompt

Fired when the browser fires the "beforeinstallprompt" event. Corresponds to .

BeginRequest

Fired at the beginning of every request.

BrowserSizeChanged

Fired when the user resizes the browser.

BrowserTabActivated

Fired when the user activates the browser tab.

BrowserTabDeactivated

Fired when the user deactivates the browser tab.

CultureChanged

Fired when the changes.

EndRequest

Fired at the end of every request.

FocusedControlChanged

Fired when the focused control changes.

HashChanged

Fired when the hash part of the URL changes on the client side.

Idle

Fired when the current thread has completed processing all the events and before the response is sent back to the client.

LicenseError

Fired when a license error occurs.

ResponsiveProfileChanged

Fired when the active responsive profile is changed.

RightToLeftChanged

Fired when the value changes.

SessionTimeout

Fired when the session is about to time out.

ThemeChanged

Fired when the current theme is changed.

ThreadException

Fired when a thread exception is thrown.

Application
docs.wisej
ClientProfile
ClientBrowser
String
ClientCollection
String
RegistryKey
String
AssemblyCompanyAttribute
Configuration
Configuration
CookieCollection
IWisejComponent
Update
CultureInfo
CultureInfo
Desktop
Boolean
String
Image
String
String
Boolean
Boolean
Boolean
Boolean
Boolean
Boolean
String
Page
FormCollection
PageCollection
ClientPlatform
String
String
AssemblyInformationalVersionAttribute
AssemblyFileVersionAttribute
NameValueCollection
Boolean
Boolean
String
Int32
NameValueCollection
Object
Int32
String
Boolean
Boolean
String
Uri
String
ClientTheme
ClientTheme
ClientTheme
String
IPrincipal
String
String
String
WindowsIdentity
WindowsIdentity
String[]
Task
Task
Task
Task<Object>
Task
Task<Boolean>
Task
Task
Task<Object>
Task
IWisejComponent
IWisejComponent
IList<IWisejComponent>
IWisejComponent
Assembly
Assembly
IWisejComponent
IWisejComponent
Task<Boolean>
String
Task<String>
Task
ArgumentOutOfRangeException
background-tasks
Task
Task
background-tasks
Task<T>
Timer
Timer
Timer
Timer
system.threading
EventHandler
EventHandler
EventHandler
EventHandler
EventHandler
BeforeInstallPromptEvent
EventHandler
EventHandler
EventHandler
EventHandler
EventHandler
EventHandler
HashChangedEventHandler
EventHandler
LicenseErrorEventHandler
ResponsiveProfileChangedEventHandler
HandledEventHandler
EventHandler
ThreadExceptionEventHandler
Dictionary
Page
Desktop
Application
Form
Page
ClientTheme
Session
Cookies
ServerVariables
ServerPort
ServerName
UserAgent
Uri
Url
StartupUri
StartupUrl
StartupPath
ProductName
ProductVersion
SessionTimeout
BeginRequest
ApplicationStart
ApplicationExit
ApplicationRefresh
BrowserSizeChanged
ResponsiveProfileChanged
CultureChanged
Browser
Browser
Download
Call
Eval
Navigate
Reload
MainPage
Desktop
OpenForms
OpenPages
FindComponent
FindComponents
StartTask
LoadTheme
Theme
Exit
Application
StartTask
Current
Update
RunInContext
Current
LicenseKey
Uri
Uri
StartupUri
String
StartupUrl
IsWebSocket
EndPolling
Timer
Update
StartPolling
EndPolling
Timer
Update
StartTask
StartPolling
EndPolling
EventHandler
CurrentCulture
EventHandler
RightToLeft
IEventFilter
IEventFilter
String
String
String
String
Object[]
String
Action<Object>
Object[]
String
Object[]
String
String
String
Image
String
Stream
String
String
String
String
String
Image
String
String
Stream
String
String
String
Action<Object>
String
Predicate<IWisejComponent>
Predicate
IWisejComponent
Predicate<IWisejComponent>
Predicate
IWisejComponent
String
String
String
IEnumerable<Package>
Action<Boolean>
IEnumerable<Package>
String
String[]
String
String
String
MessageBoxIcon
MessageBoxIcon
String
Action
IWisejWindow
String
String
IEventFilter
IEventFilter
IWisejComponent
IWisejComponent
Context
Action
Int32
Int32
Action
Func<T>
Int32
Int32
Action
IWisejComponent
IWisejComponent
Context
Action
IWisejComponent
UInt32