The following code example demonstrates how to use to use a DetailsView control in combination with a GridView control for a simple master-detail scenario. It displays the details of an item selected in the GridView control.
Visual Basic
<%@ Page Language="VB" %>
ASP.NET Example
C#
<%@ Page Language="C#" %>
ASP.NET Example
The following code example demonstrates how to use the DetailsView control to add, delete, and edit records.
Visual Basic
<%@ Page Language="VB" %>
DetailsView Example
C#
<%@ Page Language="C#" %>
DetailsView Example
The following code example demonstrates how to declaratively add row fields to the DetailsView control.
Visual Basic
<%@ Page Language="VB" %>
ASP.NET Example
This section contains two code examples. The first code example demonstrates how to use the ShowCheckBox property to specify whether a check box is displayed for a node. The second code example provides sample XML data for the first code example.
The following example demonstrates how to use the ShowCheckBox property to specify whether a check box is displayed for a node. For this example to work correctly, you must copy the sample XML data, provided after this code example, to a file named Book.xml.
Visual Basic
<%@ Page Language="VB" %>
TreeNodeBinding ShowCheckBox Example
C#
<%@ Page Language="C#" %>
TreeNodeBinding ShowCheckBox Example
The following code example provides sample XML data for the preceding code example.