ErrorWebPart.AddAttributesToRender(HtmlTextWriter) Method
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.
Applies special error style attributes to an ErrorWebPart object that is inserted into a page in place of another control.
protected:
override void AddAttributesToRender(System::Web::UI::HtmlTextWriter ^ writer);
protected override void AddAttributesToRender (System.Web.UI.HtmlTextWriter writer);
override this.AddAttributesToRender : System.Web.UI.HtmlTextWriter -> unit
Protected Overrides Sub AddAttributesToRender (writer As HtmlTextWriter)
Parameters
- writer
- HtmlTextWriter
An HtmlTextWriter that contains the HTML output to be rendered.
Remarks
The AddAttributesToRender method takes the style characteristics (if any) that are defined in the ErrorStyle object for the WebZone zone that contains an ErrorWebPart control. The styles are applied to the ErrorWebPart control prior to rendering.
Notes to Inheritors
This method can be overridden in a derived ErrorWebPart class, if developers want to customize the style characteristics that are applied to an ErrorWebPart control.
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 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기