1. Add the gridview to the page and modify the control name gvuser.
2. Set the data source datasource (objectdatasource, etc)
3. Set the datakeynames attribute of the gridview,The delete operation is based on this primary key.
4. modify the code of the gridview and add the modify and delete buttons to it.
<Asp: gridview id = "gvuser" runat = "server"
Autogeneratecolumns = "false" datakeynames = "userid"
Performanceid = "objectperformanceuser" onrowdeleted = "gvuser_rowdeleted">
<Columns>
<Asp: boundfield datafield = "userid" headertext = "userid"
Sortexpression = "userid"/>
<Asp: boundfield datafield = "username" headertext = "username"
Sortexpression = "username"/>
<Asp: boundfield datafield = "userpass" headertext = "userpass"
Sortexpression = "userpass"/>
<Asp: boundfield datafield = "role" headertext = "role" sortexpression = "role"/>
<Asp: boundfield datafield = "regtime" headertext = "regtime"
Sortexpression = "regtime"/>
<Asp: boundfield datafield = "lognum" headertext = "lognum"
Sortexpression = "lognum"/>
<Asp: commandfield showeditbutton = "true" headertext = ""/>
<Asp: templatefield showheader = "false">
<Itemtemplate>
<Asp: linkbutton id = "lbdelete" runat = "server" causesvalidation = "false"
Onclientclick = "Return confirm ('Are you sure you want to delete it? ') "Text =" delete "commandname =" delete "> </ASP: linkbutton>
</Itemtemplate>
<Headerstyle forecolor = "# 0033cc"/>
<Itemstyle horizontalalign = "center" verticalalign = "Middle"/>
</ASP: templatefield>
</Columns>
</ASP: gridview>