Export (0) Print
Expand All

ErrorWebPart.AddAttributesToRender Method

Applies special error style attributes to an ErrorWebPart object that is inserted into a page in place of another control.

Namespace: System.Web.UI.WebControls.WebParts
Assembly: System.Web (in system.web.dll)

protected override void AddAttributesToRender (
	HtmlTextWriter writer
)
protected void AddAttributesToRender (
	HtmlTextWriter writer
)
protected override function AddAttributesToRender (
	writer : HtmlTextWriter
)
Not applicable.

Parameters

writer

An HtmlTextWriter that contains the HTML output to be rendered.

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 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.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft