ASP.NET Wrapper
From Visual WebGui Wiki
Contents |
Overview
With the ASP.NET wrapper, you can take any ASP.NET control, run it through the wrapper and use it like any other native VisualWebGui control.
Availability
The availability of the Automated ASP.NET wrapper depends on the version of Visual Studio and the version of Visual WebGui you use.
Professional studio automated wrapper
The Automated ASP.NET wrapper is a VisualWebGui integration for Visual WebGui Professional Studio, that integrates into Visual Studio professional and standard versions an allows you to automatically wrap any ASP.NET control and use it like any other VisaualWebGui control.
Express studio and SDK manual wrapping
In Visual WebGui Express Studio and SDK versions of Visual WebGui, the wrapper is not supplied as an integration addon to Visual Studio, but still you can manually wrap any ASP.NET control in the same manner.
Samples of use
Some ASP.NET controls have allready been wrapped by Gizmox or the Community
Crystal Reports Viewer
A code sample showing a wrapped CrystalViewer, as well as two other methods of approach using Crystal as a Server control and through AspPageBox/AspPageBase.
Microsoft ReportViewer
A code sample showing a wrapped Microsoft.ReportViewer.WebForm version 9, as well as two simple methods of using the wrapped control to view report data from a local datasource and from NorthWind SQL database. This sample wrapper is the result of a Case study of wrapping the Microsoft ReportViewer as a typical ASP.NET control.
Tips and Tricks
Preventing 'Value cannot be null' errors in wrapped control
- See Preventing Value cannot be null exception
- How to isolate and identify designer "Value cannot be null" errors for wrapped ASP.NET controls - tracker entry here.
Extending ASP.NET controls before wrapping
If there is a need to extend the functionality of a ASP.NET control, you can extend the control first, then wrap the extended control (forums).
Custom DOCTYPE for wrapped ASP.NET control
Case studies
Walkthrough - Wrapping Microsoft ReportViewer
As an exapmple of wrapping of typical ASP.NET control, we can take the wrapping of Microsoft.ReportViewer.WebForm version 9.
Limitations and workarounds
Referencing problems in SDK version 6.2.x
In the 6.2.x versions of the SDK there are referencing problems with the ReportViewer wrapped control. To work around that problem, you can use wrapped ReportViewer control in the Samples of Use
Wrapping of Ajax type ASP.NET controls
Starting with SDK version 6.3.7, all types of ASP.NET controls can be wrapped. Earlier versions had limitations with wrapping certain types of Ajax type ASP.NET controls.
SDK Version highlights
- The Integrated ASP.NET Wrapper was first introduced in version 6.2 or VisualWebGui.
- Version 6.3.7 added Ajax wrapping capability.
Rererences
Articles
- How to use Visual WebGui new ASP.NET integrated rapid wrapper capabilities
- Manually wrapping ASP.NET controls without the use of VisualWebGui designer
- How To Wrap ASP.NET Controls (Walkthrough) – Infragistics UltraWebGrid
- How To Wrap ASP.NET Controls (Code-Snippet) – FarPoint FpSpread
- How To Wrap ASP.NET Controls (Walkthrough) - Telerik RadListBox
- How To Wrap ASP.NET Controls (Walkthrough) – ComponentOne C1Calendar
- ASP.NET Wrapper - Custom DOCTYPE for a wrapped control
Videos
Code samples
Forum discussons
- Wrapping DevExpress XtraReport
- Using Object ASP.NET's ObjectDataSource within wrapped controls
- How does the ASP.NET wrapper really work behind the scenes
- Raising events from within the ASP.NET client to update contents of Visual WebGui application - CreateEvent/RaiseEvent dummyevent
- Using ScriptManager and UpdatePanel for partial page refreshes (Ajax) and PostBack=True to sync with server
- You can ASP.NET Wrap ASP.NET controls that use Silverlight if the presentation layer is DHTML
- Ajax controls that use ScriptManager and/or UpdatePanel
- Communicating between the Wrapped control and hosting Visual WebGui application
- How the wrapper works in client to server communications
- Changing the DOCTYPE of hosted controls via PageAdapter (sample here)
- Wrapping MSCharts and getting rid of "Chart height must be set in pixels"
- Injecting JavaScript code into the HEAD element of a wrapped control
- Wrapping DayPilot and using DoSubmit() on a wrapped control to force a postback
- Getting rid of blue border around a wrapped control
- Wrapping Dart PowerUploader with useful information on wrapper inner workings and modifications required for the wrapper generated code
Other references
ASP.NET controls and control suites you might want to consider wrapping
- DayPilot - Ajax Calendar/Scheduling controls
- FreeTextEditor
- DevExpress
- Infragistics
- ComponentGo
- FreeTextBox
- Dart PowerUploader
- Twain scanning
