System.Web.UI.WebControls.WebParts.WebPart.ImportErrorMessage Property

Gets or sets an error message that is used if errors occur when a System.Web.UI.WebControls.WebParts.WebPart control is imported.

Syntax

public virtual string ImportErrorMessage { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

The WebPart.ImportErrorMessage property allows you to set a custom error message that is displayed if an error occurs when a user tries to import a part control's description file into a catalog of Web Parts controls. You can set the property declaratively on a System.Web.UI.WebControls.WebParts.WebPart control, adding the ImportErrorMessage attribute within the opening tag of the control and assigning an error message string to it. You can also set the property value programmatically.

For a full code example that demonstrates both exporting and importing .WebPart description files for System.Web.UI.WebControls.WebParts.WebPart controls, which includes use of the WebPart.ImportErrorMessage property, see the System.Web.UI.WebControls.WebParts.ImportCatalogPart class.

The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see System.ComponentModel.LocalizableAttribute and ASP.NET Globalization and Localization.

The personalization scope of this property is set to PersonalizationScope.Shared and can be modified only by authorized users. For more information, see System.Web.UI.WebControls.WebParts.PersonalizableAttribute and Web Parts Personalization Overview.

Requirements

Namespace: System.Web.UI.WebControls.WebParts
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0