System.Web.UI.WebControls Namespace DetailsView Class
.NET Framework version 2.0
Returns or sets the text to render in an HTML caption element in a DetailsView control. This property is provided to make the control more accessible to users of assistive technology devices.
Inline |
<asp:detailsview caption = strCaption ... > |
Script |
DetailsView.Caption [ = strCaption ] |
sCaption |
A string that represents the text to render in an HTML caption element in a DetailsView control. The default value is an empty string ( "" ). |
This property is read/write with no default value.
Use the Caption property to specify the text to render in an HTML caption element in a DetailsView control. The text that you specify provides assistive technology devices with a description of the table that can be used to make the control more accessible.
Additional accessibility support for the DetailsView control is provided by the CaptionAlign property. Use the CaptionAlign property to specify the alignment of the HTML caption element in a DetailsView control.
The value of this property, when set, can be saved automatically to a resource file by using a designer tool.
The following sample illustrates using the Caption property.
<asp:detailsview id = "EmployeeDetailsView"
datasourceid = "EmployeeSource"
allowpaging
datakeynames = "EmployeeID"
caption = "Employee Details"
captionalign = "Left"
runat = "server">
DetailsView Members CaptionAlign