<html>
<title>DetailsView AutoGenerateDeleteButton Example</title>
<link rel="stylesheet" href="/shared/netdemos.css">
</head>
<body>
<!-- #include virtual="~/shared/top.inc" -->
<div class="header"><h2>DetailsView <span class="hilite">AutoGenerateDeleteButton</span> Example</h2></div>
<hr size=1 width=92%>
<form runat="server">
<div align="center">
<asp:detailsview id="guestDetails" runat="server"
width=70% cellpadding=5
datasourceid="guests"
datakeynames="GuestId"
autogeneratedeletebutton
allowpaging>
<rowstyle
backcolor="ghostwhite"
verticalalign="top" />
<commandrowstyle font-bold
horizontalalign="center" />
<fieldheaderstyle
backcolor="lightsteelblue"
horizontalalign="right" />
<headertemplate>
<center>
<p id="msg">To remove this entry, press Delete</p>
</center>
</headertemplate>
</asp:detailsview>
<asp:sqldatasource id="guests" runat="server"
selectcommand="SELECT * FROM aspx_guests"
deletecommand="DELETE FROM aspx_guests WHERE GuestId=@GuestId"
connectionstring="<%$ ConnectionStrings:aspnet %>" />
</div>
</form>
<hr size=1 width=92%>
<!-- #include virtual="~/shared/viewsrc.inc" -->
</body>
</html>