Back to Devexpress

DefaultWebDocumentViewerContainer.RegisterConnectionProviderFactory<T>() Method

xtrareports-devexpress-dot-xtrareports-dot-web-dot-webdocumentviewer-dot-defaultwebdocumentviewercontainer-dot-registerconnectionproviderfactory-1.md

latest2.7 KB
Original Source

DefaultWebDocumentViewerContainer.RegisterConnectionProviderFactory<T>() Method

Registers a factory that returns an object implementing the IConnectionProviderService interface.

Namespace : DevExpress.XtraReports.Web.WebDocumentViewer

Assembly : DevExpress.XtraReports.v25.2.Web.dll

NuGet Package : DevExpress.Web.Reporting.Common

Declaration

csharp
public static void RegisterConnectionProviderFactory<T>()
    where T : IConnectionProviderFactory
vb
Public Shared Sub RegisterConnectionProviderFactory(Of T As IConnectionProviderFactory)

Type Parameters

Name
T

Remarks

Call the RegisterConnectionProviderFactory<T> method at the application startup in the Global.asax file to register a custom IConnectionProviderService implementation in the Web Document Viewer.

csharp
using DevExpress.XtraReports.Web.WebDocumentViewer;
// ...

void Application_Start(object sender, EventArgs e) {
    DefaultWebDocumentViewerContainer.RegisterConnectionProviderFactory<MyConnectionProviderFactory>();
}
vb
Imports DevExpress.XtraReports.Web.WebDocumentViewer
' ...

Private Sub Application_Start(sender As Object, e As EventArgs)
    DefaultWebDocumentViewerContainer.RegisterConnectionProviderFactory(Of MyConnectionProviderFactory)
End Sub

See Register Services in the Document Viewer for a complete list of available services and their registration methods.

See Also

DefaultWebDocumentViewerContainer Class

DefaultWebDocumentViewerContainer Members

DevExpress.XtraReports.Web.WebDocumentViewer Namespace