ErrorWebPart.ErrorMessage 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 the error message that is displayed in a Web page in place of a control that could not be successfully added to the page.
public:
property System::String ^ ErrorMessage { System::String ^ get(); void set(System::String ^ value); };
public string ErrorMessage { get; set; }
member this.ErrorMessage : string with get, set
Public Property ErrorMessage As String
Property Value
A string that contains the text of the error message. The default value is a culture-specific error message.
Remarks
The ErrorMessage property can be assigned a value by a developer, so that a custom error message is displayed at the point where the ErrorWebPart control is inserted into a page.
Notes to Inheritors
Developers can assign a default value to the ErrorMessage property by extending the ErrorWebPart class and, in the ErrorWebPart(String, String, String, String) constructor or in an overridden EndLoadPersonalization() method, assigning a default value to the property.
To require the WebPartManager control to use a custom ErrorWebPart control, you must also inherit from the WebPartManager class and override its CreateErrorWebPart(String, String, String, String, String) method. In that method, you should assign the value of the method's errorMessage
parameter to the ErrorMessage property of your custom ErrorWebPart control, because the WebPartManager control calls this method from several other places, and usually passes in a specific error message.
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기