DetailsView CheckBoxField
DetailsViewCheckBoxFieldExample.aspx
<%@ Page Language="C#" %> <!DOCTYPE html> <script runat="server"> </script> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title>asp.net asp:CheckBoxField example: how to use CheckBoxField in DetailsView</title> </head> <body> <form id="form1" runat="server"> <div> <h2 style="color:Navy">DetailsView CheckBoxField Example</h2> <asp:Label ID="Label1" runat="server" Font-Italic="true" ForeColor="Red"></asp:Label> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" SelectCommand="SELECT ProductID, ProductName, UnitPrice, Discontinued FROM Products" > </asp:SqlDataSource> <asp:DetailsView ID="DetailsView1" runat="server" DataSourceID="SqlDataSource1" AllowPaging="true" ForeColor="AliceBlue" BackColor="DodgerBlue" BorderColor="LightSkyBlue" AutoGenerateRows="false" > <Fields> <asp:BoundField HeaderText="Product ID" DataField="ProductID" /> <asp:BoundField HeaderText="Product Name" DataField="ProductName" /> <asp:BoundField HeaderText="Unit Price" DataField="UnitPrice" /> <asp:CheckBoxField HeaderText="Discontinued" DataField="Discontinued" /> </Fields> <HeaderTemplate> <b>Product Details</b> </HeaderTemplate> <HeaderStyle BackColor="DarkBlue" /> </asp:DetailsView> </div> </form> </body> </html>

- asp.net QueryStringParameter example: using GridView, SqlDataSource
- asp.net SqlDataSource example: programmatically adding SqlDataSource and ControlParameter
- asp.net OnUpdated, SqlDataSourceStatusEventArgs example: using SqlDataSource
- asp.net GridView CheckBoxField example: how to use asp:CheckBoxField