Back to Devexpress

ReportStorageWebExtension.IsValidUrl(String) Method

xtrareports-devexpress-dot-xtrareports-dot-web-dot-extensions-dot-reportstoragewebextension-dot-isvalidurl-x28-system-dot-string-x29.md

latest3.0 KB
Original Source

ReportStorageWebExtension.IsValidUrl(String) Method

Determines whether the URL passed to the current report storage is valid.

Namespace : DevExpress.XtraReports.Web.Extensions

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

NuGet Package : DevExpress.Web.Reporting.Common

Declaration

csharp
public virtual bool IsValidUrl(
    string url
)
vb
Public Overridable Function IsValidUrl(
    url As String
) As Boolean

Parameters

NameTypeDescription
urlString

A report name (URL).

|

Returns

TypeDescription
Boolean

True if the specified name (URL) is valid; otherwise, false.

|

Remarks

Use the IsValidUrl method to validate the report name (URL) that is passed to your Report Storage. Implement your own logic to prohibit URLs that contain spaces or other specific characters. Return true if no validation is required.

The reporting component calls the IsValidUrl method when the component opens a report and before the GetData method.

The Report Designer calls the IsValidUrl method when the component saves a report with the specified name (URL) before the CanSetData and SetData methods.

The reporting component does not call the IsValidUrl method before the SetNewData method. Validate and correct the name of the newly created report in the SetNewData method implementation.

For a code example, create a new Web project from the DevExpress Visual Studio template and review the code for the CustomReportStorageWebExtension class in the Services folder.

See Also

Add a Report Storage (ASP.NET Web Forms)

ReportStorageWebExtension Class

ReportStorageWebExtension Members

DevExpress.XtraReports.Web.Extensions Namespace