NextPreviousPagerField.RenderDisabledButtonsAsLabels Property

 

Gets or sets a value that indicates whether disabled buttons are rendered as Label controls by the NextPreviousPagerField object.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)

public bool RenderDisabledButtonsAsLabels { get; set; }

Property Value

Type: System.Boolean

true if disabled buttons are rendered as Label controls; otherwise, false. The default is false.

Use the RenderDisabledButtonsAsLabels property to specify whether disabled buttons are rendered as Label controls by the NextPreviousPagerField object. The buttons are disabled by the NextPreviousPagerField object when the function associated with the button cannot be performed. For example, when you are in the first page of data, the first-page and previous-page buttons are disabled.

By default, the NextPreviousPagerField object renders the disabled buttons by using the control type specified by the ButtonType property. It also sets the Enabled property of the control to false.

When RenderDisabledButtonsAsLabels is set to true, the NextPreviousPagerField object uses the Label control to render the disabled buttons. The value of the ButtonCssClass property is used to set the CssClass property of the Label control.

The value of this property is stored in viewstate.

.NET Framework
Available since 3.5
Return to top
Show: