WebPart.ImportErrorMessage Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets an error message that is used if errors occur when a WebPart control is imported.
public:
virtual property System::String ^ ImportErrorMessage { System::String ^ get(); void set(System::String ^ value); };
[System.Web.UI.WebControls.WebParts.Personalizable(System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared)]
public virtual string ImportErrorMessage { get; set; }
[<System.Web.UI.WebControls.WebParts.Personalizable(System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared)>]
member this.ImportErrorMessage : string with get, set
Public Overridable Property ImportErrorMessage As String
Property Value
A string that contains the error message. The default value is a standard error message supplied by the Web Parts control set.
- Attributes
Remarks
The 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 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 WebPart controls, which includes use of the ImportErrorMessage property, see the 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 LocalizableAttribute and Globalization and Localization.
The personalization scope of this property is set to Shared and can be modified only by authorized users. For more information, see PersonalizableAttribute and Web Parts Personalization Overview.
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기