AspNetWrapperBase
Namespace: Wisej.Web.Ext.AspNetControl
Assembly: Wisej.Web.Ext.AspNetControl (4.1.0.0)
Base non-generic class for AspNetWrapperBase.
- C#
- VB.NET
public abstract class AspNetWrapperBase : IFramePanel
Public MustInherit Class AspNetWrapperBase
Inherits IFramePanel
Constructors
AspNetWrapperBase()
Initializes a new instance of AspNetWrapper.
The new instance saves the VIEWSTATE of the ASP.NET page in the Wisej session (see UseSessionViewState). This class is abstract: derive from AspNetWrapper to wrap a specific ASP.NET control.
Example:
The following example creates a wrapper that stores the VIEWSTATE in the page instead of the Wisej session:
public class CalendarWrapper : AspNetWrapper<System.Web.UI.WebControls.Calendar>
{
public CalendarWrapper()
{
this.UseSessionViewState = false;
}
}
Properties
IsAsync
Boolean: Returns whether the current request is an asynchronous postback.
IsCallback
Boolean: Returns whether the current request is a callback.
IsPostBack
Boolean: Returns whether the current request is a postback.
Page
Page: Returns the instance of the internal page used to wrap the ASP.NET control. It is valid only during the processing of the Init or the Load events.
ScriptManager
ScriptManager: Returns the instance of the ScriptManager in the AspNetHost.asp page used to wrap AspNet controls.
UseSessionViewState
Boolean: Determines whether Wisej saves the VIEWSTATE in memory. The default is true.
ViewState
Object: VIEWSTATE saved using Wisej sessions.
WrappedControl
WebControl: Returns the instance of the wrapped ASP.NET control. It is valid only during the processing of the Init or the Load events.
Methods
CreateHostedControl()
Creates the wrapped control.
Returns: WebControl.
OnAbortTransaction(e)
Fires the AbortTransaction event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnCommitTransaction(e)
Fires the CommitTransaction event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnDataBinding(e)
Fires the DataBinding event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnError(e)
Fires the Error event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnInit(e)
Fires the Init event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnInitComplete(e)
Fires the InitComplete event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnLoad(e)
Fires the Load event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnLoadComplete(e)
Fires the LoadComplete event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnPreInit(e)
Fires the PreInit event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnPreLoad(e)
Fires the PreLoad event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnPreRender(e)
Fires the PreRender event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnPreRenderComplete(e)
Fires the PreRenderComplete event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnSaveStateComplete(e)
Fires the SaveStateComplete event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnUnload(e)
Fires the Unload event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
Update()
Causes the control to update the corresponding client side widget. When in design mode, causes the rendered control to update its entire surface in the designer.
Calling this method changes the URL of the inner IFrame, which reloads the host page and runs the ASP.NET page life cycle again. Use it to apply property values that are copied to WrappedControl in the Init or Load events.
Example:
The following example reloads a wrapped calendar when its date changes on the server:
public class CalendarWrapper : AspNetWrapper<System.Web.UI.WebControls.Calendar>
{
public DateTime VisibleDate
{
get { return this._visibleDate; }
set
{
if (this._visibleDate != value)
{
this._visibleDate = value;
Update();
}
}
}
private DateTime _visibleDate = DateTime.Today;
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
this.WrappedControl.VisibleDate = this._visibleDate;
}
}
Events
AbortTransaction
EventHandler Corresponds to the Page.AbortTransaction event.
CommitTransaction
EventHandler Corresponds to the Page.CommitTransaction event.
DataBinding
EventHandler Corresponds to the Page.DataBinding event.
Error
EventHandler Corresponds to the Page.Error event.
Init
EventHandler Corresponds to the Page.Init event in the ASP.NET page life cycle.
InitComplete
EventHandler Corresponds to the Page.InitComplete event in the ASP.NET page life cycle.
Load
EventHandler Corresponds to the Page.Load event in the ASP.NET page life cycle.
LoadComplete
EventHandler Corresponds to the Page.LoadComplete event in the ASP.NET page life cycle.
PreInit
EventHandler Corresponds to the Page.PreInit event in the ASP.NET page life cycle.
PreLoad
EventHandler Corresponds to the Page.PreLoad event in the ASP.NET page life cycle.
PreRender
EventHandler Corresponds to the Page.PreRender event in the ASP.NET page life cycle.
PreRenderComplete
EventHandler Corresponds to the Page.PreRenderComplete event in the ASP.NET page life cycle.
SaveStateComplete
EventHandler Corresponds to the Page.SaveStateComplete event.
Unload
EventHandler Corresponds to the Page.Unload event in the ASP.NET page life cycle.
Inherited By
| Name | Description |
|---|---|
| AspNetWrapper<T> | The AspNetWrapperBase is the base class of all wrapped ASP.NET controls. |