xtrareports-devexpress-dot-xtrareports-dot-web-dot-extensions-dot-reportstoragewebextension-dot-isvalidurl-x28-system-dot-string-x29.md
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
public virtual bool IsValidUrl(
string url
)
Public Overridable Function IsValidUrl(
url As String
) As Boolean
| Name | Type | Description |
|---|---|---|
| url | String |
A report name (URL).
|
| Type | Description |
|---|---|
| Boolean |
True if the specified name (URL) is valid; otherwise, false.
|
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